1// always a child controller (either ViewCartController.js or ViewWishListController.js) 2var CartEntryListController = function ($scope, $interval, $filter, $mdDialog, $http, _cartService, _wishlistService, _clubService, $timeout) { 3 4 var cartEntryListCtrl = this; 5 var $parent = $scope.$parent; 6 7 $scope.$watch("cart.CartEntryList", function (value) { 8 if (value == undefined) return false; 9 angular.forEach($scope.cart.CartEntryList, $scope.buildRestrictionNotes); 10 11 if ($parent && $parent.userInfo && $parent.userInfo.ShowEmployeeCost) { 12 if ($parent.userInfo.EmployeeCompany && $parent.userInfo.EmployeeCompany == 'SG') { 13 var stdPct = $parent.configValues.SportsmansGuideCostPercent; 14 var gunsPct = $parent.configValues.SportsmansGuideGunsCostPercent; 15 var ammoPct = $parent.configValues.SportsmansGuideAmmoCostPercent; 16 } 17 if ($parent.userInfo.EmployeeCompany && $parent.userInfo.EmployeeCompany == 'TGW') { 18 var stdPct = $parent.configValues.TheGolfWarehouseCostPercent; 19 var gunsPct = $parent.configValues.TheGolfWarehouseGunsCostPercent; 20 var ammoPct = $parent.configValues.TheGolfWarehouseAmmoCostPercent; 21 } 22 if ($parent.userInfo.EmployeeCompany && $parent.userInfo.EmployeeCompany == 'Windquest') { 23 var stdPct = $parent.configValues.WindquestCostPercent; 24 var gunsPct = $parent.configValues.WindquestGunsCostPercent; 25 var ammoPct = $parent.configValues.WindquestAmmoCostPercent; 26 } 27 $scope.cart.CartEntryList.forEach(function (ci) { 28 if (!ci.IsFreeGift) { 29 if (ci.IsAmmo) 30 ci.employeeCost = (ci.StdCost + (ci.StdCost * ammoPct)) * ci.Quantity; 31 else if (ci.IsFirearm) 32 ci.employeeCost = (ci.StdCost + (ci.StdCost * gunsPct)) * ci.Quantity; 33 else 34 ci.employeeCost = (ci.StdCost + (ci.StdCost * stdPct)) * ci.Quantity; 35 } 36 }); 37 } 38 39 $('.view-cart-container').css('height', 'unset'); //Remove the placeholder when the tiles are ready. 40 41 //if (!$scope.cart.IsCurrentClubMember && !$scope.cart.ClubExistsInCart) { 42 // angular.element(document).ready(function () { 43 // buildClubTile(); 44 // }); 45 //} 46 47 checkPurchaseLimits(); 48 }); 49 50 $scope.updateItemQty = function (id, qty) { 51 if (qty != $('#Quantity_' + id).attr('old-value')) { 52 cartEntryListCtrl.cartEntryForm.$setSubmitted(); 53 if (!cartEntryListCtrl.cartEntryForm.$valid) return false; 54 55 if ($scope.cart.IsWishListPage) { 56 return _wishlistService.updateQtyInWishList(id, qty, $scope.cart.IsCatalogQuickOrder).then( 57 function (data) { 58 if (!data.success) return false; 59 setWishlistQuantityText(); 60 $parent.freshWishlistPostProcessing(data.cart); 61 $timeout(function () { 62 $('#UpdateLink_' + id).focus(); 63 }); 64 injectTealium(); 65 } 66 ); 67 } 68 69 return _cartService.updateCartQuantity(id, qty, $scope.cart.IsCatalogQuickOrder).then( 70 function (data) { 71 if (data.success) { 72 $scope.getCart().then( 73 function () { 74 setCartQuantityText(); 75 $timeout(function () { 76 $('#UpdateLink_' + id).focus(); 77 }); 78 if (data.miniCartHtml && data.miniCartHtml != "") { 79 updateShowMiniCart(data.miniCartHtml, false); 80 } 81 injectTealium(); 82 } 83 ); 84 } 85 } 86 ); 87 88 } 89 } 90 91 $scope.removeItem = function (id) { 92 cartEntryListCtrl.cartEntryForm.$setSubmitted(); 93 94 if ($scope.cart.IsWishListPage) { 95 return _wishlistService.updateQtyInWishList(id, 0, $scope.cart.IsCatalogQuickOrder).then( 96 function (data) { 97 if (!data.success) return false; 98 setWishlistQuantityText(); 99 $parent.freshWishlistPostProcessing(data.cart); 100 injectTealium(); 101 } 102 ); 103 } 104 105 return _cartService.updateCartQuantity(id, 0, $scope.cart.IsCatalogQuickOrder).then( 106 function (data) { 107 if (data.success) { 108 $scope.getCart().then( 109 function () { 110 setCartQuantityText(); 111 if (data.miniCartHtml && data.miniCartHtml != "") { 112 updateShowMiniCart(data.miniCartHtml, false); 113 } 114 if(data.cartQty == 0) injectTealium(); 115 } 116 ); 117 } 118 } 119 ); 120 } 121 122 $scope.cartMoveToWishList = function (el, cartEntryId, inCheckout, inQuickOrder) { 123 //TODO Improve this to use angular service and material modal 124 125 if ($scope.userInfo.SignedIn) { 126 CartMoveToWishListAsync(el, cartEntryId, inCheckout, inQuickOrder); 127 $scope.getCart(); 128 } else { 129 CartMoveToWishListAfterLogin(cartEntryId, false); 130 } 131 } 132 133 $scope.wishlistMoveToCart = function (cartEntryId) { 134 $scope.toggleInlineLoading(true); 135 return _wishlistService.wishlistMoveToCart(cartEntryId).then(function (results) { 136 if (!results.success) return false; 137 $scope.toggleInlineLoading(false); 138 if (!results.cartMax) { 139 $parent.freshWishlistPostProcessing(results.wishlist); 140 setCartQuantityText(); // calls setWishlistQuantityText() again... :( 141 142 if (results.wishlist.CartEntryList.length == 0) 143 $("#wishlist-action-bar").fadeOut("slow"); // print and email icons, doesn't need to shown in empty wish list 144 145 } else { 146 // show max cart modal 147 // TODO: convert to material design
148 $("#cart-limit-modal-trigger").moby({ 149 'modalClass': 'cart-limit-modal gradient-gray', 150 'ariaLabelText': 'Full Cart', 151 'onCompleteCallback': function () { 152 $(".moby-close").on('click', function (event) { 153 event.preventDefault(); 154 $("#cart-limit-modal-trigger").moby('hide'); 155 }); 156 } 157 }).moby('show', '#cart-limit-modal'); 158 } 159 }); 160 } 161 162 //$scope.wishlistNotifyMe = function (event, promoCode, cartEntryId, name, colorCode, sizeCode) { 163 // event.preventDefault(); 164 // notifyMeFamilyGroup(promoCode, cartEntryId, name, colorCode, sizeCode); 165 //}; 166 167 $scope.wishlistCopyToCart = function (promoCode, sku, quantity) { 168 169 return _wishlistService.wishlistCopyToCart(promoCode, sku, quantity).then(function (results) { 170 if (!results.success) return false; 171 172 if (results.cartMax) { 173 $("#cart-limit-modal-trigger").moby({ 174 'modalClass': 'cart-limit-modal gradient-gray', 175 'ariaLabelText': 'Full Cart', 176 'onCompleteCallback': function () { 177 $(".moby-close").on('click', function (event) { 178 event.preventDefault(); 179 $("#cart-limit-modal-trigger").moby('hide'); 180 }); 181 } 182 }).moby('show', '#cart-limit-modal'); 183 } else { 184 setCartQuantityText(); 185 } 186 }); 187 } 188 $scope.editArrowCutting = function (entry) { 189 //TODO Improve this to use angular service and material modal 190 191 return AjaxJsonPostWrapper.ajaxRoute($scope.cart.IsWishListPage ? 'wishlist' : 'cart', 'editarrowcutting', { entry: entry }, function (result) { 192 //handle personalize modal 193 if (result.personalizeHtml) { 194 if (($personalizeTrigger = $('#personalize-trigger')).length && ($personalizeModal = $('#personalize-modal')).length) { 195 //init the modal and set the Html from the response, since Moby requires an anchor we're triggering a click on the hidden anchor 196 $personalizeTrigger.moby({ 197 'modalClass': 'personalize-mod', 198 'onCompleteCallback': function () { 199 Gorilla.util.initForms(); 200 $('#personalize-mod').validate(); 201 }, 202 'onCloseCallback': function () { 203 if ($scope.cart.IsWishListPage) 204 $parent.getWishlistModel(); // refresh the main display 205 } 206 }); 207 $personalizeModal.html(result.personalizeHtml); 208 $personalizeTrigger.trigger('click').off('click'); 209 } 210 } 211 }); 212 } 213 214 $scope.removeArrowCutting = function (entry) { 215 //TODO Improve this to use angular service and material modal 216 return AjaxJsonPostWrapper.ajaxRoute($scope.cart.IsWishListPage ? 'wishlist' : 'cart', 'removearrowcutting', { entry: entry}, function (result) { 217 if (!result.success) return false; 218 219 return $scope.cart.IsWishListPage ? $parent.getWishlistModel() : $parent.getCart(); 220 }); 221 } 222 223 //$scope.editPersonalization = function (id, personalized) { 224 // //TODO Improve this to use angular service and material modal 225 226 // return AjaxJsonPostWrapper.ajaxRoute($scope.cart.IsWishListPage ? 'wishlist' : 'cart', 'editpersonalization', { entryId: id, isPersonalized: personalized }, function (result) { 227 // //handle personalize modal 228 // if (result.personalizeHtml) { 229 // if (result.personalizeHtml.substr(0, 10) == "embroidery") { 230 // document.location.href = ($scope.cart.IsWishListPage ? "/wishlist/" : "/cart/") + result.personalizeHtml; 231 // } 232 // else if (($personalizeTrigger = $('#personalize-trigger')).length && ($personalizeModal = $('#personalize-modal')).length) { 233 // //init the modal and set the Html from the response, since Moby requires an anchor we're triggering a click on the hidden anchor 234 // $personalizeTrigger.moby({ 235 // 'modalClass': 'personalize-mod', 236 // 'onCompleteCallback': function () { 237 // Gorilla.util.initForms();
238 // $('#personalize-mod').validate(); 239 // }, 240 // 'onCloseCallback': function () { 241 // if ($scope.cart.IsWishListPage) 242 // $parent.getWishlistModel(); // refresh the main display 243 // } 244 // }); 245 // $personalizeModal.html(result.personalizeHtml); 246 // $personalizeTrigger.trigger('click').off('click'); 247 // } 248 // } 249 // }); 250 //} 251 252 //$scope.removePersonalization = function (id) { 253 // //TODO Improve this to use angular service and material modal 254 // return AjaxJsonPostWrapper.ajaxRoute($scope.cart.IsWishListPage ? 'wishlist' : 'cart', 'removepersonalization', { entryId: id }, function (result) { 255 // if (!result.success) return false; 256 257 // return $scope.cart.IsWishListPage ? $parent.getWishlistModel() : $parent.getCart(); 258 // }); 259 //} 260 261 $scope.changeLiftGate = function (item) { 262 if (!item.FreightAddOns.Liftgate) { 263 $scope.freightItem = item; 264 //Get Weight 265 _cartService.getFreightWeight(item).then( 266 function (data) { 267 $scope.freightItem.FreightAddOns.Weight = data.Weight; 268 } 269 ); 270 //Get Ack Message 271 _cartService.getFreightAckMsg().then( 272 function (message) { 273 $scope.freightItem.FreightAddOns.AckMsg = message; 274 } 275 ); 276 $scope.modal = { 277 customCssClass: "md-shipping-restrictions-modal", 278 title: "Are you sure you want to remove Liftgate Service?", 279 templateUrl: "/templates/cart/liftgatemodal.html" 280 } 281 $mdDialog.show($mdDialog.restrictedModal({ scope: $scope })); 282 } else { 283 $scope.updateFreightDelivery(item); 284 } 285 } 286 287 $scope.keepLiftGate = function (item) { 288 var el = $filter('filter')($scope.cart.CartEntryList, { 'EntryId': item.FreightAddOns.CartEntryId })[0]; 289 el.FreightAddOns.Liftgate = true; 290 291 $scope.closeDialog(); 292 } 293 294 $scope.removeLiftGate = function (item) { 295 //Send Ack Message with id of 17 296 _cartService.sendAckMsg(17); 297 298 //Uncheck front door if checked 299 if (item.FreightAddOns.FrontDoor) { 300 item.FreightAddOns.FrontDoor = false; 301 } 302 303 $scope.updateFreightDelivery(item); 304 305 $scope.closeDialog(); 306 } 307 308 $scope.changeFrontDoor = function (item) { 309 if (!item.FreightAddOns.FrontDoor) { 310 $scope.freightItem = item; 311 //Get Weight 312 _cartService.getFreightWeight(item).then( 313 function (data) { 314 if (data != undefined) { 315 $scope.freightItem.FreightAddOns.Weight = data.Weight; 316 } else { 317 $scope.freightItem.FreightAddOns.Weight = item.Weight; 318 } 319 } 320 ); 321 322 $scope.modal = { 323 customCssClass: "md-shipping-restrictions-modal", 324 title: "Are you sure you want to remove Front Door Service?", 325 templateUrl: "/templates/cart/frontdoormodal.html" 326 } 327 $mdDialog.show($mdDialog.restrictedModal({ scope: $scope })); 328 } else { 329 item.FreightAddOns.Liftgate = true; 330 $scope.updateFreightDelivery(item); 331 } 332 } 333 334 $scope.keepFrontDoor = function (item) { 335 var el = $filter('filter')($scope.cart.CartEntryList, { 'EntryId': item.FreightAddOns.CartEntryId })[0]; 336 el.FreightAddOns.FrontDoor = true; 337 338 $scope.closeDialog(); 339 } 340 341 $scope.removeFrontDoor = function (item) { 342 343 $scope.updateFreightDelivery(item); 344 345 $scope.closeDialog(); 346 } 347 348 $scope.updateFreightDelivery = function (item) { 349 var opt; 350 if (item.FreightAddOns.Liftgate && item.FreightAddOns.FrontDoor) 351 opt = "F"; 352 else if (item.FreightAddOns.Liftgate) 353 opt = "L"; 354 else 355 opt = "D"; 356 357 var request = { 358 EntryId: item.FreightAddOns.CartEntryId, 359 Opt: opt 360 }; 361 362 _cartService.setFreightDeliveryOption(request); 363 } 364 365 $scope.changeSpecifyShipDate = function (cartItem) { 366 _cartService.setSpecifyShipDate(cartItem.EntryId, cartItem.ShipDateMod.SelectedShipDate); 367 } 368 369 $scope.changeGloveBreakIn = function (cartItem) { 370 return _cartService.modifyCartGloveBreakIn(cartItem.EntryId, cartItem.HasGloveBreakIn).then( 371 function (data) { 372 if (data) { 373 $scope.getCart().then( 374 function () { 375 injectTealium(); 376 } 377 ); 378 } 379 } 380 ); 381 } 382 383 $scope.buildRestrictionNotes = function (item, index) { 384 $scope.cart.CartEntryList[index].restrictionNotes = []; 385 if (item.BundleSavingsAmt > 0) { 386 $scope.cart.CartEntryList[index].restrictionNotes.push("Your 'Buy Together and Save' discount has been applied to this item."); 387 } 388 if (item.MinimumAge > 0) { 389 $scope.cart.CartEntryList[index].restrictionNotes.push("You must be " + item.MinimumAge + " years of age to purchase this item."); 390 } 391 if (!item.IsItemUpgradeable && !item.IsDropShip) { 392 $scope.cart.CartEntryList[index].restrictionNotes.push("This item cannot ship via any of our Next Day or Second Day Express delivery methods."); 393 } 394 if (item.IsDropShip && !item.IsItemUpgradeable && !item.IsFirearm && !item.IsGiftCard) { 395 $scope.cart.CartEntryList[index].restrictionNotes.push("This item is shipped directly from the vendor. It cannot ship via any of our Next Day or Second Day Express delivery methods."); 396 } 397 if (item.IsFoId) { 398 $scope.cart.CartEntryList[index].restrictionNotes.push("-- Firearm Owner's ID card Required. Instructions for submittal provided during checkout."); 399 } 400 if (item.NoShipFee && !item.IsFirearm && !item.IsGiftCard) { 401 $scope.cart.CartEntryList[index].restrictionNotes.push("Free Shipping has been applied on this item."); 402 } 403 if (!item.PromoMsg == "") { 404 $scope.cart.CartEntryList[index].restrictionNotes.push(item.PromoMsg); 405 } 406 if (item.HasRebate) { 407 $scope.cart.CartEntryList[index].restrictionNotes.push("<a class=\"underline\" href=\"" + item.RebateFormURL + "\" target=\"_blank\">Rebate Available</a>"); 408 } 409 if (!item.ShipMsg == "") { 410 $scope.cart.CartEntryList[index].restrictionNotes.push(item.ShipMsg); 411 } 412 if (item.IsGiftCard) { 413 if (item.ColorCode == "4E3") { 414 $scope.cart.CartEntryList[index].restrictionNotes.push("Gift Cards ship free via standard mail to the address provided at time of order. Gift Cards may not be processed and shipped for up to 24 hours after order placement."); 415 } 416 else if (item.ColorCode == "4E4") { 417 $scope.cart.CartEntryList[index].restrictionNotes.push("eGift Cards will be e-mailed to you within 24 hours excluding weekends."); 418 } 419 } 420 if (item.PayPalRestricted && $scope.cart.PayPalActive) { 421 $scope.cart.CartEntryList[index].restrictionNotes.push("PayPal is unavailable as a payment method for this item. <a class=\"underline\" href=\"//www.paypal.com/us/webapps/mpp/ua/acceptableuse-full\" target=\"_blank\">PayPal Acceptable Use Policy</a>"); 422 } 423 } 424 425 $scope.showCartMessages = function (cartItem) { 426 //return !cartItem.IsWarranty && (cartItem.restrictionNotes && cartItem.restrictionNotes.length && cartItem.ID !== 0) || 427 // (cartItem.CouponPromoText && cartItem.CouponPromoText.length) || c
427artItem.GwpClubMemberOnly || cartItem.employeeCost; 428 return (cartItem.restrictionNotes && cartItem.restrictionNotes.length) || (cartItem.CouponPromoText && cartItem.CouponPromoText.length) || (cartItem.IncludedDiscounts && cartItem.IncludedDiscounts.length); 429 } 430 431 $scope.closeDialog = function () { 432 $mdDialog.hide(); 433 $scope.freightItem = undefined; 434 $scope.modal = undefined; 435 } 436 437 $scope.toggleInlineLoading = function (loading) { 438 if (loading) 439 $('.loading').show(); 440 else 441 $('.loading').hide(); 442 } 443 444 function checkPurchaseLimits() { 445 $scope.cart.CartEntryList.forEach(function (cartEntry) { 446 if (cartEntry.PurchaseQtyLimit !== 99999 && cartEntry.PurchaseQtyLimit !== 0) { 447 cartEntry.restrictionNotes.unshift('<strong>This item has a limit of ' + cartEntry.PurchaseQtyLimit + ' per order.</strong>'); 448 if (cartEntry.Quantity > cartEntry.PurchaseQtyLimit) { 449 $timeout(function () { 450 if ($scope.cartEntryListCtrl && $scope.cartEntryListCtrl.cartEntryForm && $scope.cartEntryListCtrl.cartEntryForm.cartItemForm && $scope.cartEntryListCtrl.cartEntryForm.cartItemForm.itemQty) { 451 $scope.cartEntryListCtrl.cartEntryForm.cartItemForm.itemQty.$setTouched(); 452 } 453 }, 500); 454 } 455 } 456 }); 457 } 458 459 //function buildClubTile() { 460 // _clubService.getClubInfo("WX2", "ogloyaltyTrial").then(function (result) { 461 // var clubCost = ""; 462 // if (result.ActualClubCost == "0.00") 463 // clubCost = "Free"; 464 // else 465 // clubCost = "$" + result.ActualClubCost; 466 467 // var $subhead = $("<div class=\"everything-ships-free\">Everything ships free</div>"); 468 // var $benefits = $("<ul class=\"club-benefits-list\"><li><div class=\"marker\">All orders of $49+</div></li ><li><div class=\"marker\">No code needed</div></li></ul>"); 469 // var $action = $("<div class=\"club-footer-links bc2018 club-container\"><div class=\"centered club-links\"><div class=\"club-link-action-main\"><a href=\"javascript: preventDefault();\" class=\"free-trial-button\" onclick=\"addTrialClub('WX2', 'ogloyaltyTrial', '', true, true); return false;\">Start 3-Month Club Intro for just " + clubCost + "</a></div></div></div>"); 470 471 // var $container = $("<div class=\"club-footer-container\">"); 472 // var $tile = $("<div id=\"cart-tile-bc-spiff\" class=\"cart-tile club-footer\">"); 473 474 // $container.append($subhead, $benefits, $action); 475 // if (!$scope.cart.IsClubMemberQuery) { 476 // $tile.append($container); 477 // } 478 479 // if ($('form[name="cartEntryListCtrl.cartEntryForm"] .cart-tile').length >= 3) { 480 // $('form[name="cartEntryListCtrl.cartEntryForm"] > div:nth-child(3)').after($tile); 481 // } else { 482 // $('form[name="cartEntryListCtrl.cartEntryForm"] .cart-tile').last().after($tile); 483 // } 484 // }); 485 //} 486 487 function injectTealium () { 488 489 return _cartService.setCartTealium().then(function (tealium) { 490 $.getScript(tealium.utag).done(function () { 491 $('#tealiumAjax').empty(); 492 493 //tealium loaded.. no callback :( 494 if (typeof utag === "object" && typeof s === "object" && $("#tealiumAjax").length) { 495 $('#tealiumAjax').append(tealium.tagParams); 496 return false; 497 } 498 499 //keep polling until tealium is loaded 500 var tealiumInterval = $interval(function () { 501 if (typeof utag === "object" && typeof s === "object" && $('#tealiumAjax').length) { 502 $('#tealiumAjax').append(tealium.tagParams); 503 $interval.cancel(tealiumInterval); 504 tealiumInterval = undefined; 505 } 506 }, 100); 507 }); 508 }); 509 }; 510} 511 512CartEntryListController.$inject = ['$scope', '$interval', '$filter', '$mdDialog', '$http', '_cartService', '_wishlistService', '_clubService', '$timeout'];; 513//prevent timing issue with rocket loader 514if ($("#CartWishListHomepageController").length) { 515 var cwEvent = function (event) { 516 setTimeout(function () { 517 var $scope = angular.element("#CartWishListHomepageController").scope(); 518 if ($scope == undefined) return false; 519 if (event.type === "load") $scope.getType(); 520 if (window.innerWidth <= 960) { 521 $scope.mobile = true; 522 $scope.slickReady = true; 523 } else { 524 $scope.mobile = false; 525 } 526 //resize can change size of text 527 $scope.setProductHeights();
528 529 //resize event is outside angular 530 if (event.type === "resize") $scope.$digest(); 531 }, 500); 532 } 533 window.addEventListener("load", cwEvent); 534 window.addEventListener("resize", cwEvent); 535} 536 537var CartWishListHomepageController = function ($scope, $interval, $cookies, $window, $document, _cartService, _wishlistService) { 538 539 this.$onInit = function () { 540 $scope.cart = undefined; 541 $scope.type = ""; 542 $scope.mobile = false; //Custom slider only 543 $scope.cartQtyVal = "0"; 544 $scope.wlQtyCookie = "0"; 545 546 $scope.cartAttr = { 547 "title": "In Your Shopping Cart", 548 "link": "/cart/viewcart?trackid=hpcontainer_inyourshoppingcart_checkoutbutton", 549 "linkText": "Go To Checkout", 550 "buttonText": "Checkout", 551 "class": "cart", 552 }; 553 554 $scope.wishlistAttr = { 555 "title": "On Your Wishlist", 556 "link": "/wishlist?trackid=hpcontainer_onyourwishlist_viewwishlistbutton", 557 "linkText": "View Wishlist", 558 "buttonText": "View Wishlist", 559 "class": "wishlist" 560 }; 561 562 //Custom slider needs these media queries 563 if ($window.innerWidth <= 960) { 564 $scope.mobile = true; 565 } 566 567 $scope.slickConfig = { 568 dots: 'true', 569 arrows: 'true', 570 slidesToShow: 4, 571 slidesToScroll: 4, 572 infinite: 'true', 573 prevArrow: '<span class="sg-slick-prev" role="button" tabindex="0" aria-label="Previous"> ‹ </span>', 574 nextArrow: '<span class="sg-slick-next" role="button" tabindex="0" aria-label="Next"> › </span>', 575 event: { init: function(event, slick) { hookUpQuickViews(slick.$list); $scope.setProductHeights(); } }, 576 responsive: [ 577 { 578 breakpoint: 1060, 579 settings: { 580 slidesToShow: 4, 581 slidesToScroll: 3 582 } 583 }, 584 { 585 breakpoint: 960, 586 settings: { 587 slidesToShow: 3, 588 slidesToScroll: 3 589 } 590 }, 591 { 592 breakpoint: 680, 593 settings: { 594 slidesToShow: 2, 595 slidesToScroll: 2 596 } 597 }, 598 { 599 breakpoint: 480, 600 settings: { 601 slidesToShow: 1, 602 slidesToScroll: 1 603 } 604 } 605 ] 606 }; 607 } 608 609 $scope.addedToCart = function() { 610 $scope.getType(); 611 } 612 613 $scope.$watch("cart.CartEntryList.length", function(newValue, oldValue) { 614 if (newValue == undefined || oldValue === newValue) return false; 615 if ($scope.cart.CartEntryList.length > 0) 616 $('#CartWishListHomepageController').show(); 617 if ($scope.mobile || $scope.cart.CartEntryList.length > 4) { 618 $scope.slickReady = false; 619 $scope.slickReady = true; 620 } 621 else { 622 hookUpQuickViews(document); 623 return false; 624 } 625 }); 626 627 $scope.getCart = function () { 628 _cartService.getCart().then(function (cart) { 629 $scope.cart = cart; 630 for (var i = 0; i < $scope.cart.CartEntryList.length; i++) { 631 if ($scope.cart.CartEntryList[i].IsWarranty == true) { 632 $scope.cart.CartEntryList.splice(i, 1); 633 } 634 } 635 }); 636 } 637 638 $scope.getWishList = function () { 639 _wishlistService.getWishlist().then(function (cart) { 640 $scope.cart = cart; 641 }); 642 } 643 644 $scope.getType = function () { 645 var cartCookieData = deparamCookie($cookies.get('crtclb')); 646 if (cartCookieData != null) { 647 var cartQtyCookieValue = cartCookieData["I"]; 648 if (cartQtyCookieValue != null) 649 $scope.cartQtyVal = cartQtyCookieValue; 650 } 651 652 if ($cookies.get('wlQty') != null) { 653 $scope.wlQtyCookie = $cookies.get('wlQty'); 654 } 655 656 if ($scope.cartQtyVal != "0") { 657 $scope.type = $scope.cartAttr; 658 $scope.getCart(); 659 } else if ($scope.wlQtyCookie != "0") { 660 $scope.type = $scope.wishlistAttr; 661 $scope.getWishList(); 662 } 663 } 664 665 $scope.setProductHeights = function () { 666 //get items if they're slicked 667 var items = Array.from(document.querySelectorAll("#CartWishListHomepageController .slick-list .slick-slide")); 668 if (items.length === 0) { //get items if they're not slicked and theres three or more 669 items = Array.from(document.querySelectorAll("#CartWishListHomepageController .three-or-more.tile-container")); 670 } 671 if (items.length === 0) { //no items exist... 672 return false; 673 } 674 var $items = $(items); 675 676 var nameHeight = Math.max.apply(null, $items.find(".product-name").map(function () { return $(this).height(); }).get()); 677 $items.find(".product-name").css({ "min-height": nameHeight });
678 var priceHeight = Math.max.apply(null, $items.find(".price-box").map(function () { return $(this).height(); }).get()); 679 $items.find(".price-box").css({ "min-height": priceHeight }); 680 681 var warrantyHeight = Math.max.apply(null, $items.find(".warranty-container").map(function () { return $(this).height(); }).get()); 682 $items.find(".warranty-container").css({ "min-height": warrantyHeight }); 683 if (warrantyHeight > 0) { 684 $items.find(".warranty-container").css({ "margin": "10px 0" }); //set extra margin on items with no warranties 685 } 686 } 687} 688CartWishListHomepageController.$inject = ['$scope', '$interval', '$cookies', '$window', '$document', '_cartService', '_wishlistService'];; 689var ChatDialogController = function ($scope, $timeout, _userService, _chatService, _logService, _configService) { 690 691 var chatCtrl = this; 692 693 this.$onInit = function () { 694 695 $scope.chat = {}; 696 $scope.hide = true; 697 $scope.chatOpen = false; 698 $scope.showForm = false; 699 $scope.chatState = { Active: false, Visible: false }; 700 getConfigValues();
701 //Setup Genesys 702 (function (g, e, n, es, ys) { 703 g['_genesysJs'] = e; 704 g[e] = g[e] || function () { 705 (g[e].q = g[e].q || []).push(arguments) 706 }; 707 g[e].t = 1 * new Date(); 708 g[e].c = es; 709 ys = document.createElement('script'); ys.async = 1; ys.src = n; ys.charset = 'utf-8'; document.head.appendChild(ys); 710 })(window, 'Genesys', 'https://apps.usw2.pure.cloud/genesys-bootstrap/genesys.min.js', { 711 environment: 'usw2', 712 deploymentId: '82ce9378-9c8d-481d-a5a6-2e27a6f56f2f' 713 714 }); 715 716 Genesys("subscribe", "Messenger.closed", function () { 717 document.getElementById('agent-chat-btn').style.display = 'inline-block'; 718 window.setTimeout(function () { $("#agent-chat-btn").focus(); }, 1000); 719 $scope.chat = {}; 720 if ($scope.showForm) { 721 chatCtrl.InfoForm.$setPristine(); 722 chatCtrl.InfoForm.$setUntouched(); 723 chatCtrl.InfoForm.$submitted = false; 724 $scope.showForm = false; 725 } 726 }); 727 728 Genesys("subscribe", "MessagingService.conversationDisconnected", function (o) { genesysEventTracker(o); }); 729 Genesys("subscribe", "Messenger.closed", function (o) { genesysEventTracker(o); }); 730 Genesys("subscribe", "Messenger.opened", function (o) { genesysEventTracker(o); }); 731 Genesys("subscribe", "MessagingService.messagesReceived", function (o) { genesysEventTracker(o); }); 732 733 } 734 735 $scope.toggleMessenger = function () { 736 $scope.hide = !$scope.hide; 737 document.getElementById('agent-chat-btn').style.display = 'none'; 738 739 return _chatService.getAvailable().then(function (response) { 740 $scope.greetingMsg = response.greetingMsg; 741 $scope.closedMsg = response.closedMsg; 742 743 if (!$scope.chatState.Active) { 744 if ((response.isOpen && response.interacting) || response.idle > 0) { 745 $scope.chatOpen = true; 746 747 } else { 748 $scope.chatOpen = false; 749 } 750 } else { 751 $scope.startChat(); 752 } 753 }); 754 } 755 756 $scope.chatForm = function () { 757 $scope.showForm = true; 758 return _userService.getUserInfo().then(function (userInfo) { 759 if (typeof userInfo !== 'undefined') { 760 if (userInfo.FirstName) $scope.chat.FirstName = userInfo.FirstName; 761 if (userInfo.LastName) $scope.chat.LastName = userInfo.LastName; 762 if (userInfo.Email) $scope.chat.Email = userInfo.Email; 763 if (userInfo.CustomerNumber) { 764 $scope.chat.CustomerNumber = userInfo.CustomerNumber; 765 } 766 if (userInfo.UserId) { 767 $scope.chat.UserId = userInfo.UserId; 768 } 769 } 770 }); 771 772 } 773 774 $scope.startChat = function () { 775 if (typeof chatCtrl.InfoForm !== 'undefined') { 776 chatCtrl.InfoForm.$setSubmitted(); 777 if (!chatCtrl.InfoForm.$valid) { 778 $scope.showFormErrors(chatCtrl.InfoForm); 779 return false; 780 } 781 } 782 783 $scope.hide = !$scope.hide; 784 $scope.showForm = false; 785 786 if (typeof $scope.chat !== 'undefined' && $scope.chat.FirstName.length && $scope.chat.Subject.length) { 787 Genesys("command", "Messenger.open", {}, 788 function (o) { // if resolved 789 setTimeout(function () { 790 trapFocus($("#chatForm")); 791 $(".chat-close-btn").focus(); 792 $(".chat-widget").off('keydown').on("keydown", function (e) { 793 if (e.keyCode === 27) $(".chat-close-btn").click(); 794 }); 795 }, 250); 796 if (!$scope.chatState.Active) { 797 $timeout(function () { 798 Genesys("command", "MessagingService.sendMessage", { 799 message: "Your chat has been received. A team member will be with you momentarily." 800 }); 801 }, 1000); 802 } 803 setGenesysData(); 804 document.getElementById('agent-chat-btn').style.display = 'none'; 805 }, 806 function (o) { // if rejected 807 Genesys("command", "Messenger.close"); 808 document.getElementById('agent-chat-btn').style.display = 'inline-block'; 809 } 810 ); 811 } else { 812 var logError = {
813 Message: "startChat called with invalid data", 814 Exception: JSON.stringify($scope.chat), 815 FileName: "ChatDialogController" 816 }; 817 _logService.error(logError); 818 Genesys("command", "Messenger.close"); 819 Genesys("command", "MessagingService.clearSession"); 820 } 821 } 822 823 function setGenesysData() { 824 825 if ($scope.configValues.LogChatData) { 826 var logError = { 827 Message: "setGenesysData", 828 Exception: JSON.stringify($scope.chat), 829 FileName: "ChatDialogController" 830 }; 831 _logService.error(logError); 832 } 833 834 Genesys("command", "Database.set", { 835 messaging: { 836 customAttributes: { 837 _FirstName: $scope.chat.FirstName, 838 _LastName: $scope.chat.LastName, 839 _Email: $scope.chat.Email, 840 _CusotmerNumber: $scope.chat.CustomerNumber, 841 _UserID: $scope.chat.UserId, 842 _Subject: $scope.chat.Subject 843 } 844 } 845 }); 846 } 847 848 function genesysEventTracker(o) { 849 if (o.event == 'messagingservice.messagesreceived') { 850 if (o.data.messages[0].type == 'Event') { 851 if (o.data.messages[0].events[0].presence.type == 'Disconnect') { 852 $scope.chatState.Active = false; 853 } 854 else { $scope.chatState.Active = true; } 855 } 856 else { 857 $scope.chatState.Active = true; 858 // optional start 859 if ($scope.chatState.Visible == false && o.data.messages[0].type == 'Text') { 860 if (typeof $scope.chat !== 'undefined' && $scope.chat.FirstName.length && $scope.chat.Subject.length) { 861 862 Genesys("command", "Messenger.open", {}, 863 function (o) { // if resolved 864 setGenesysData(); 865 document.getElementById('agent-chat-btn').style.display = 'none'; 866 }, 867 function (o) { // if rejected 868 Genesys("command", "Messenger.close"); 869 document.getElementById('agent-chat-btn').style.display = 'inline-block'; 870 } 871 ); 872 } 873 } 874 // optional end 875 } 876 } 877 if (o.event == 'messenger.opened') { 878 $scope.chatState.Visible = true; 879 } 880 else if (o.event == 'messenger.closed') { 881 $scope.chatState.Visible = false; 882 } 883 if (o.event == 'messagingservice.conversationdisconnected') { 884 $scope.chatState.Active = false; 885 } 886 } 887 888 function getConfigValues() { 889 _configService.getConfigValues().then( 890 function (values) { 891 $scope.configValues = values; 892 } 893 ); 894 } 895 896 $scope.showFormErrors = function (form) { 897 angular.forEach(form.$error, function (field) { 898 angular.forEach(field, function (errorField) { 899 errorField.$setTouched(); 900 }); 901 }); 902 } 903 904 $scope.closeDialog = function () { 905 $scope.hide = !$scope.hide; 906 document.getElementById('agent-chat-btn').style.display = 'inline-block'; 907 $scope.chat = {}; 908 if ($scope.showForm) { 909 chatCtrl.InfoForm.$setPristine(); 910 chatCtrl.InfoForm.$setUntouched(); 911 chatCtrl.InfoForm.$submitted = false; 912 $scope.showForm = false; 913 } 914 } 915} 916 917ChatDialogController.$inject = ['$scope', '$timeout', '_userService', '_chatService', '_logService', '_configService']; 918; 919 920var CouponDialogController = function($scope, $mdDialog, $window) { 921 922 $scope.showDialog = function (item) { 923 var cpdArray = $window.cpdArray; 924 var index = cpdArray.findIndex(function (x) { return x.ItemId === item });
925 if (index < 0) return false; 926 var cpdObject = cpdArray[index]; 927 if (cpdObject !== null && cpdObject !== undefined && cpdObject.DisclaimerText !== undefined && cpdObject.DisclaimerText !== "") { 928 $scope.DisclaimerText = cpdObject.DisclaimerText; 929 $scope.modal = { 930 title: 'Offer Details', 931 templateUrl: "/templates/shared/coupon-promo-modal.html" 932 } 933 934 $mdDialog.show($mdDialog.modal({ scope: $scope })); 935 } 936 } 937 938 $scope.closeDialog = function () { 939 $mdDialog.hide(); 940 $scope.DisclaimerText = undefined; 941 $scope.modal = undefined; 942 } 943} 944 945 946CouponDialogController.$inject = ['$scope', '$mdDialog', '$window']; 947; 948var CQOController = function ($scope) { 949 950 this.$onInit = function () { 951 952 $scope.itemNumber = undefined; 953 } 954 955 $scope.getItem = function () { 956 var id = 0; 957 var promo = ""; 958 if ($scope.itemNumber.split('-').length == 2) { 959 id = parseInt($scope.itemNumber.split('-')[1], 10); 960 var regex = new RegExp("^[0-9a-zA-Z0-9]+$"); 961 promo = $scope.itemNumber.split('-')[0].toUpperCase(); 962 if (!regex.test(promo)) 963 promo = ""; 964 } 965 966 if (promo === "GWPX") { 967 promo = "WX2"; 968 } 969 970 $('#quickorderbtn').attr("href", "/product/getproductcartdata?ID=" + id + "&PCode=" + promo).click(); 971 972 return false; 973 } 974} 975 976CQOController.$inject = ['$scope'];; 977var EmailVideoController = function ($scope, $location, $sce, _cloudflareService) { 978 979 this.$onInit = function () { 980 $scope.qp = $location.search(); 981 if ($scope.qp.id == undefined) return false; 982 983 getDetail($scope.qp.id); 984 } 985 986 $scope.$on('videoTitle:ready', function () { 987 $scope.videoScript = $sce.trustAsHtml('<stream id="sg-stream" src="' + $scope.qp.id +'" controls preload autoplay muted width="720px"></stream>' + 988 '<script data-cfasync="false" defer type="text/javascript" src="https://embed.cloudflarestream.com/embed/r4xu.fla9.latest.js?video=' + 989 $scope.qp.id + '"></script>'); 990 }); 991 992 function getDetail(id) { 993 _cloudflareService.GetVideoDetail(id).then(function (data) { 994 $scope.vm = data; 995 }); 996 } 997} 998 999EmailVideoController.$inject = ['$scope', '$location', '$sce', '_cloudflareService'];; 1000var FlyoutController = function ($scope, $mdSidenav, $location, $cookies, $window, _productService) { 1001 1002 this.$onInit = function () { 1003 $scope.flyoutOpened = false; 1004 $scope.mobileNavOpened = false; 1005 $scope.secondaryOpen = false; 1006 $scope.thirdOpen = false; 1007 $scope.showShopAll = true; 1008 $scope.departments = []; 1009 1010 $scope.mobileNavProductsAccordian = true; 1011 $scope.mobileNavMoreAccordian = false; 1012 1013 $scope.secondLevelCategories = []; 1014 $scope.thirdLevelCategories = []; 1015 1016 $scope.parentName = ""; 1017 $scope.parentNameL2 = ""; 1018 $scope.shopAll = {}; 1019 $scope.shopAll.Description = undefined; 1020 $scope.shopAll.Url = undefined; 1021 1022 $scope.shopAllL2 = {}; 1023 $scope.shopAllL2.Description = ""; 1024 $scope.shopAllL2.Url = ""; 1025 1026 function loadCategories() { 1027 return _productService.getNavCategories().then(function (response) { 1028 if (response.deptMenu) { 1029 $scope.firstLevelCategories = response.deptMenu.Categories; 1030 $scope.division = response.deptMenu.Division; 1031 $scope.showGiftGuide = response.showGiftGuide; 1032 if (response.deptMenu.Division == 31) { 1033 $scope.giftGuideLink = "/event?key=baseball_gift_guide"; 1034 } 1035 else { 1036 $scope.giftGuideLink = "/event?key=softball_gift_guide"; 1037 } 1038 } else { 1039 return; 1040 } 1041 }); 1042 } 1043 1044 if (window.categoryNav) { 1045 $scope.firstLevelCategories = window.categoryNav.Categories; 1046 $scope.division = window.categoryNav.Division; 1047 $scope.showGiftGuide = window.categoryNav.ShowGiftGuide; 1048 if (window.categoryNav.Division == 31) { 1049 $scope.giftGuideLink = "/event?key=baseball_gift_guide"; 1050 } 1051 else { 1052 $scope.giftGuideLink = "/event?key=softball_gift_guide"; 1053 } 1054 } else { 1055 loadCategories(); 1056 } 1057 } 1058 1059 $scope.openMobileNav = function () { 1060 $scope.mobileNavOpened = true; 1061 $mdSidenav('mobile-sidenav').toggle(); 1062 } 1063 1064 $scope.openLeftMenu = function () { 1065 $scope.flyoutOpened = true; 1066 $mdSidenav('sidenav').toggle(); 1067 }; 1068 1069 $scope.openSecondary = function (subcats, parent) { 1070 var desc = parent.Description.toLowerCase(); 1071 var hiddenAllCats = ["brand", "sale"]; 1072 if (hiddenAllCats.includes(desc) || parent.ID == 213 ) { 1073 $scope.showShopAll = false; 1074 } else { 1075 $scope.showShopAll = true; 1076 } 1077 $scope.parentName = parent.Description; 1078 1079 $scope.shopAll.Url = parent.Url; 1080 $scope.shopAll.Description = parent.Description; 1081 $scope.secondaryOpen = true; 1082 $scope.secondLevelCategories = subcats; 1083 } 1084 1085 $scope.openThird = function (subcats, parent) { 1086 if (subcats.length < 1) { 1087 return false; 1088 } 1089 $scope.parentNameL2 = parent.Description; 1090 1091 $scope.shopAllL2.Description = parent.Description; 1092 $scope.shopAllL2.Url = parent.Url; 1093 1094 $scope.thirdOpen = true; 1095 $scope.secondaryOpen = false; 1096 var x = subcats.filter((subcat) => subcat.Description.startsWith('All'));
1097 var desc = parent.Description.toLowerCase(); 1098 var hiddenAllCats = ["brand", "sale"]; 1099 if (x.length > 0 || hiddenAllCats.includes(desc)) { 1100 $scope.showShopAll = false; 1101 } else { 1102 $scope.showShopAll = true; 1103 } 1104 1105 $scope.thirdLevelCategories = subcats; 1106 } 1107 1108 $scope.goToUrl = function (url) { 1109 window.location.href = url; 1110 }; 1111 1112 $scope.highlightSelectedMenuItem = function ($event, highlightAllProduct = false) { 1113 var parent; 1114 1115 if (highlightAllProduct) { 1116 parent = angular.element($event.currentTarget).closest('p'); 1117 } else { 1118 parent = angular.element($event.currentTarget).closest('ul'); 1119 } 1120 1121 var siblings = parent.parent().children('ul, p'); 1122 siblings.removeClass('highlight-selection'); 1123 1124 parent.addClass('highlight-selection'); 1125 }; 1126 1127 $scope.backToSecond = function () { 1128 $scope.shopAll.Description = $scope.parentName; 1129 var desc = $scope.parentName.toLowerCase(); 1130 var hiddenAllCats = ["brand", "sale"]; 1131 if (hiddenAllCats.includes(desc)) { 1132 $scope.showShopAll = false; 1133 } else { 1134 $scope.showShopAll = true; 1135 } 1136 $scope.thirdOpen = false; 1137 $scope.secondaryOpen = true; 1138 } 1139 1140 $scope.goBack = function () { 1141 $scope.parentName = ""; 1142 $scope.secondLevelCategories = []; 1143 $scope.secondaryOpen = false; 1144 } 1145 1146 $scope.closeMobile = function () { 1147 $scope.mobileNavOpened = false; 1148 $mdSidenav('mobile-sidenav').toggle(); 1149 } 1150 1151 $scope.toggleProducts = function () { 1152 $scope.mobileNavProductsAccordian = !$scope.mobileNavProductsAccordian; 1153 $scope.mobileNavMoreAccordian = false; 1154 if ($scope.mobileNavProductsAccordian === false) { 1155 $scope.secondaryOpen = false; 1156 $scope.thirdOpen = false; 1157 } 1158 } 1159 1160 $scope.toggleMore = function () { 1161 $scope.mobileNavMoreAccordian = !$scope.mobileNavMoreAccordian; 1162 $scope.mobileNavProductsAccordian = false; 1163 $scope.secondaryOpen = false; 1164 $scope.thirdOpen = false; 1165 } 1166 1167 $mdSidenav('sidenav').then(function (instance) { 1168 instance.onClose(function () { // gets rid of the nav cover for cart flyouts, etc 1169 $scope.flyoutOpened = false; 1170 $scope.thirdOpen = false; 1171 $scope.secondaryOpen = false; 1172 $(".nav-cover").hide().toggleClass("nav-cover nav-cover-x"); 1173 }) 1174 }) 1175 1176 $mdSidenav('mobile-sidenav').then(function (instance) { 1177 instance.onClose(function () { // gets rid of the nav cover for cart flyouts, etc 1178 $scope.mobileNavOpened = false; 1179 $scope.thirdOpen = false; 1180 $scope.secondaryOpen = false; 1181 1182 $(".nav-cover").hide().toggleClass("nav-cover nav-cover-x"); 1183 }) 1184 }) 1185} 1186 1187FlyoutController.$inject = ['$scope', '$mdSidenav', '$location', '$cookies', '$window', '_productService'];; 1188var GiftCardRecipientController = function ($scope, $mdDialog, _cartService, _addressService) { 1189 1190 var gcRecipCtrl = this; 1191 1192 this.$onInit = function () { 1193 $scope.gcVariantSelected = false; 1194 $scope.gcRecipient = {}; 1195 $scope.gcRecipient.emailToMe = true; 1196 $scope.gcRecipient.email = ""; 1197 $scope.gcRecipient.fName = ""; 1198 $scope.gcRecipient.lName = ""; 1199 $scope.gcRecipient.message = ""; 1200 getStateList(); 1201 } 1202 1203 $scope.triggerModal = function (entryId, type, location) { 1204 $scope.recipient = {}; 1205 $scope.recipient.EntryId = entryId; 1206 $scope.recipient.GiftCardType = type; 1207 1208 $scope.recipient.SendDate = moment().add(1, 'days').format("MM/DD/YYYY"); 1209 $scope.myDate = new Date(); 1210 $scope.minDate = new Date( 1211 $scope.myDate.getFullYear(), 1212 $scope.myDate.getMonth(), 1213 $scope.myDate.getDate() + 1); 1214 $scope.maxDate = new Date( 1215 $scope.myDate.getFullYear(), 1216 $scope.myDate.getMonth() + 6, 1217 $scope.myDate.getDate()); 1218 1219 switch (location) { 1220 case 'addToCart': 1221 $scope.recipient.RecipientFlag = true; 1222 $scope.recipient.CustomizeDate = false; 1223 break; 1224 case 'viewCart': 1225 _cartService.getGiftCardRecipient(entryId).then(function (response) { 1226 $scope.recipient = response; 1227 $scope.recipient.EntryId = entryId; 1228 $scope.recipient.GiftCardType = "eGift Card"; 1229 if ($scope.recipient != null && $scope.recipient.SendDate >= $scope.minDate) { 1230 $scope.recipient.CustomizeDate = true; 1231 } else { 1232 $scope.recipient.CustomizeDate = false; 1233 $scope.recipient.SendDate = $scope.minDate; 1234 } 1235 }); 1236 break; 1237 } 1238 1239 $scope.modal = { 1240 customCssClass: "gc-recipent-modal", 1241 title: type === 'Gift Card' ? "Customize My Gift Card" : "Customize My E-Gift Card", 1242 templateUrl: "/templates/shared/gift-card-recipient-modal.html" 1243 } 1244 1245 return $mdDialog.show($mdDialog.restrictedModal({ scope: $scope })); 1246 } 1247
1248 $scope.saveGiftCard = function () { 1249 if (typeof gcRecipCtrl.recipientForm !== 'undefined' && $scope.recipient.RecipientFlag) { 1250 gcRecipCtrl.recipientForm.$setSubmitted(); 1251 if (!gcRecipCtrl.recipientForm.$valid) { 1252 $scope.showFormErrors(gcRecipCtrl.recipientForm); 1253 return false; 1254 } 1255 } 1256 1257 if (!$scope.recipient.CustomizeDate) 1258 $scope.recipient.SendDate = null; 1259 1260 _cartService.putGiftCardRecipient($scope.recipient).then(function (response) { 1261 if (response) 1262 $scope.closeDialog(); 1263 }); 1264 1265 } 1266 1267 $scope.toggleRecipient = function () { 1268 if (!$scope.recipient.RecipientFlag) { 1269 $scope.recipient.Email = ""; 1270 $scope.recipient.FirstName = ""; 1271 $scope.recipient.LastName = ""; 1272 $scope.recipient.Address1 = ""; 1273 $scope.recipient.Address2 = ""; 1274 $scope.recipient.City = ""; 1275 $scope.recipient.State = ""; 1276 $scope.recipient.Zip = ""; 1277 $scope.recipient.FromName = ""; 1278 $scope.recipient.Message = ""; 1279 $scope.recipient.CustomizeDate = false; 1280 $scope.recipient.SendDate = $scope.minDate; 1281 gcRecipCtrl.recipientForm.$setPristine(); 1282 gcRecipCtrl.recipientForm.$setUntouched(); 1283 } else { 1284 gcRecipCtrl.recipientForm.$setPristine(); 1285 gcRecipCtrl.recipientForm.$setUntouched(); 1286 } 1287 } 1288 1289 $scope.showFormErrors = function (form) { 1290 angular.forEach(form.$error, function (field) { 1291 angular.forEach(field, function (errorField) { 1292 errorField.$setTouched(); 1293 }); 1294 }); 1295 } 1296 1297 $scope.closeDialog = function () { 1298 $mdDialog.hide(); 1299 $scope.modal = undefined; 1300 gcRecipCtrl.recipientForm.$setPristine(); 1301 gcRecipCtrl.recipientForm.$setUntouched(); 1302 gcRecipCtrl.recipientForm.$submitted = false; 1303 } 1304 1305 function getStateList() { 1306 return _addressService.getStateDropDownList('US').then(function (stateList) { 1307 $scope.stateList = stateList; 1308 }); 1309 } 1310 1311 $scope.prepareForm = function () { 1312 $scope.gcVariantSelected = true; 1313 } 1314} 1315 1316GiftCardRecipientController.$inject = ['$scope', '$mdDialog', '_cartService', '_addressService'];; 1317//controls the add to cart modal (called from outside angular for now...) 1318//broadcasts AddToCartEvent when item is added to cart, and AddToWishlistEvent when item is added to wishlist 1319var ItemAddedDialogController = function ($scope, $rootScope, $mdDialog, $window, $interval, $cookies, $location, 1320 _cartService, _wishlistService, _certonaService) { 1321 1322 $scope.showDialog = function (type) { 1323 1324 const abGroup = $cookies.get('ab-cart'); 1325 if (abGroup == undefined || abGroup === "Control") return false; 1326 1327 $mdDialog.show($mdDialog.modal({ 1328 scope: $scope 1329 })); 1330 1331 switch (type) { 1332 case "wishlist": return doWishlist(); 1333 default: return doCart(); 1334 } 1335 } 1336 1337 $scope.viewCart = function () { 1338 if ($location.absUrl().indexOf('/cart/viewcart') > -1) { 1339 $scope.closeDialog(); 1340 } else { 1341 return $window.location.href = "/cart/viewcart"; 1342 } 1343 } 1344 1345 $scope.viewWishlist = function () { 1346 return $window.location.href = "/wishlist"; 1347 } 1348 1349 $scope.checkout = function() { 1350 return $window.location.href = "/checkout"; 1351 } 1352 1353 $scope.closeDialog = function () { 1354 $mdDialog.hide(); 1355 $scope.modal = undefined; 1356 $scope.cart = undefined; 1357 $scope.item = undefined; 1358 $scope.certonaLoading = false; 1359 $("#iad-certona" + ' .products-grid').slick('unslick'); 1360 } 1361 1362 function doCart() { 1363 return _cartService.getCart().then(function (cart) { 1364 $rootScope.$broadcast("AddToCartEvent", cart); 1365 $scope.item = cart.CartEntryList[0]; 1366 $scope.cart = cart; 1367 buildModal("cart"); 1368 }); 1369 } 1370 1371 function doWishlist() { 1372 return _wishlistService.getWishlist().then(function (wishlist) { 1373 $rootScope.$broadcast("AddToWishlistEvent", wishlist); 1374 $scope.item = wishlist.CartEntryList[0]; 1375 buildModal("wishlist"); 1376 }); 1377 } 1378 1379 function buildModal(type) { 1380 $scope.modal = { 1381 customCssClass: type === "wishlist" ? "add-to-cart-modal wishlist" : "add-to-cart-modal", 1382 title: "Item added to your " + type, 1383 templateUrl: "/templates/shared/item-added-dialog.html" 1384 } 1385 1386 $scope.certonaLoading = true; 1387 return _certonaService.getFreqPurchased($scope.item.ID).then(function (html) { 1388 $scope.certonaHtml = html; 1389 1390 //setup a manual watch for whenever the markup is done loading in the modal to prevent timing issues 1391 var intv = $interval(function () { 1392 var $iadSlider = $("#iad-certona" + ' .products-grid'); 1393 if ($iadSlider.length && !$iadSlider.hasClass('slick-initialized')) { 1394 $iadSlider.slick({ 1395 accessibility: true, 1396 dots: true, arrows: true, slidesToShow: 4, slidesToScroll: 4, infinite: false, 1397 prevArrow: '<span class="sg-slick-prev" role="button" aria-label="Previous"> ‹ </span>', 1398 nextArrow: '<span class="sg-slick-next" role="button" aria-label="Next"> › </span>', 1399 responsive: [ 1400 { 1401 breakpoint: 1200, 1402 settings: { 1403 slidesToShow: 3, 1404 slidesToScroll: 3 1405 } 1406 }, 1407 { 1408 breakpoint: 800, 1409 settings: { 1410 slidesToShow: 2, 1411 slidesToScroll: 2 1412 } 1413 }, 1414 { 1415 breakpoint: 560, 1416 settings: { 1417 slidesToShow: 1, 1418 slidesToScroll: 1 1419 } 1420 } 1421 ] 1422 }); 1423 1424 $interval.cancel(intv); 1425 $scope.certonaLoading = false; 1426 1427 //slick struggles inside a flex container, this fixes it 1428 $iadSlider.slick('resize'); 1429 } 1430 }, 100); 1431 }); 1432 } 1433} 1434 1435ItemAddedDialogController.$inject = ['$scope', '$rootScope', '$mdDialog', '$window', '$interval', '$cookies', '$location', 1436 '_cartService', '_wishlistService', '_certonaService'];;
1437var LifestylePlusFiveController = function ($scope, $mdDialog, $attrs, $element) { 1438 1439 this.$onInit = function () { 1440 $scope.navUrl = $attrs.navurl; 1441 $scope.productText = $attrs.producttext; 1442 $scope.openCloseEl = $element.parent(); 1443 $scope.baseContainer = $element.parents(".base-container.lifestylePlusFive-container"); 1444 } 1445 1446 $scope.showProductInfo = function () { 1447 if (($lsp5slider = $scope.baseContainer.find('.bcwp-widgets-wrapper')).length) { 1448 $lsp5slider.slick('slickPause'); 1449 1450 $scope.modal = { 1451 customCssClass: "lifestylePlusProduct-product-modal", 1452 title: "", 1453 templateUrl: "/templates/shared/lifestyle-plus-five-modal.html" 1454 } 1455 $mdDialog.show($mdDialog.modal({ 1456 clickOutsideToClose: true, 1457 escapeToClose: true, 1458 focusOnOpen: true, 1459 parent: $scope.baseContainer, 1460 openFrom: $scope.openCloseEl, 1461 closeTo: $scope.openCloseEl, 1462 preserveScope: true, 1463 scope: $scope, 1464 onRemoving: function () { 1465 if (($lsp5slider = $scope.baseContainer.find('.bcwp-widgets-wrapper')).length) {
1466 $lsp5slider.slick('slickPlay'); 1467 } 1468 } 1469 })); 1470 } 1471 } 1472} 1473 1474LifestylePlusFiveController.$inject = ['$scope', '$mdDialog', '$attrs', '$element'];; 1475var OrderPayByLinkController = function ($scope, $location, $timeout, $mdDialog, _orderService, _configService, _logService) { 1476 1477 var ctrl = this; 1478 1479 ctrl.$onInit = function () { 1480 $scope.orderSummaryShow = false; 1481 $scope.linkError = undefined; 1482 $scope.linkErrorCode = undefined; 1483 $scope.processComplete = false; 1484 1485 $scope.authError = undefined; 1486 1487 $scope.divisionName = "Play Baseball"; 1488 if ($location.host().indexOf("playsoftball") >= 0) { 1489 $scope.divisionName = "Play Softball"; 1490 } 1491 1492 $scope.getConfigValues().then( 1493 function () { 1494 return $scope.getPublicSquareConfig().then( 1495 function () { 1496 return $scope.getOrderPayByLink(); 1497 } 1498 ); 1499 } 1500 ); 1501 } 1502 1503 $scope.getConfigValues = function () { 1504 return _configService.getConfigValues().then( 1505 function (values) { 1506 $scope.configValues = values; 1507 } 1508 ); 1509 } 1510 1511 $scope.getPublicSquareConfig = function () { 1512 if (window.PublicSquareConfig === undefined) 1513 return; 1514 1515 return _configService.getPublicSquareConfig(window.PublicSquareConfig.timeStamp).then( 1516 function (data) { 1517 window.PublicSquareConfig.publishableKey = data.key; 1518 window.PublicSquareConfig.googlePayMerchId = data.googlePayMerchId; 1519 window.PublicSquareConfig.serverEnv = $scope.configValues.ServerEnvironment; 1520 initPublicSquare(); 1521 } 1522 ); 1523 } 1524 1525 $scope.getOrderPayByLink = function () { 1526 if (window.PayByLinkConfig === undefined) 1527 return; 1528 1529 return _orderService.getOrderPayByLink(window.PayByLinkConfig.key).then( 1530 function (response) { 1531 if (response.success) { 1532 if (response.checkout != undefined) { 1533 $scope.cart = response.checkout.Cart; 1534 $scope.billingAddress = response.checkout.BillingAddress; 1535 $scope.shippingAddress = response.checkout.ShippingAddress; 1536 $scope.orderSummary = response.checkout.CheckoutSummary; 1537 1538 if (response.payment != undefined) { 1539 $scope.payment = response.payment; 1540 $scope.payment.PaymentMethod = "cc"; 1541 } 1542 1543 $scope.publicSquareCreditCardInit(); 1544 $scope.publicSquareApplePayInit(); 1545 $scope.publicSquareGooglePayInit(); 1546 } 1547 } 1548 else { 1549 $scope.linkError = true; 1550 $scope.linkErrorCode = response.error; 1551 } 1552 } 1553 ); 1554 } 1555 1556 $scope.$watch("payment.PaymentMethod", function (newValue, oldValue) { 1557 if (newValue == undefined || newValue == oldValue) return; 1558 1559 if (newValue === "ap") { 1560 $("#ps-card-wrapper").hide(); 1561 $("#googlepay-container").hide(); 1562 1563 if ($scope.payment.ApplePayEligible) { 1564 $('#applepay-container').show(); 1565 } 1566 } 1567 else if (newValue === "gp") { 1568 $("#ps-card-wrapper").hide(); 1569 $('#paypal-container').hide(); 1570 1571 if ($scope.payment.GooglePayEligible) { 1572 $('#googlepay-container').show(); 1573 } 1574 } 1575 else if (newValue === "cc") { 1576 1577 $("#applepay-container").hide(); 1578 $("#googlepay-container").hide(); 1579 1580 if ($scope.psCard == undefined) { 1581 $("#ps-card-wrapper").show(); 1582 } 1583 } 1584 });
1585 1586 $scope.publicSquareCreditCardInit = function () { 1587 try { 1588 $scope.unmountPublicSquareCreditCard(); 1589 1590 $scope.cardNumberElement = window.publicsquare.createCardNumberElement({ placeholder: "Card number", iconPosition: "right" }); 1591 $scope.cardNumberElement.mount('#ps-cardNumber'); 1592 1593 $scope.cardExpirationDateElement = window.publicsquare.createCardExpirationDateElement({ placeholder: "Expiration MM/YY" }); 1594 $scope.cardExpirationDateElement.mount('#ps-cardExpirationDate'); 1595 1596 $scope.cardVerificationCodeElement = window.publicsquare.createCardVerificationCodeElement({ placeholder: "Security code" }); 1597 $scope.cardVerificationCodeElement.mount('#ps-cardVerificationCode'); 1598 1599 $scope.psCard = undefined; 1600 $scope.psCardError = false; 1601 $scope.psApplyCardError = false; 1602 $scope.psTooMany = false; 1603 } 1604 catch (error) { 1605 console.error(error); 1606 var logError = { 1607 Message: "Public Square Credit Card Init Failed PayByLink", 1608 Error: error, 1609 FileName: "angular.tsgMvc.js.publicSquareCreditCardInit" //server side strips the extension... lets keep it here 1610 }; 1611 _logService.error(logError); 1612 } 1613 } 1614 1615 $scope.unmountPublicSquareCreditCard = function () { 1616 try { 1617 $scope.cardNumberElement?.unmount() 1618 } catch { } 1619 1620 try { 1621 $scope.cardExpirationDateElement?.unmount() 1622 } catch { } 1623 1624 try { 1625 $scope.cardVerificationCodeElement?.unmount() 1626 } catch { } 1627 } 1628 1629 $scope.publicSquareApplePayInit = function () { 1630 try { 1631 if ($scope.configValues.UseApplePay && $scope.configValues.PayByLinkApplePay) { 1632 $scope.psApple = undefined; 1633 initApplePayButton(); 1634 } 1635 } 1636 catch (error) { 1637 console.error(error); 1638 var logError = { 1639 Message: "Public Square Apple Pay Init Failed PayByLink", 1640 Error: error, 1641 FileName: "angular.tsgMvc.js.publicSquareApplePayInit" //server side strips the extension... lets keep it here 1642 }; 1643 _logService.error(logError); 1644 } 1645 } 1646 1647 $scope.publicSquareGooglePayInit = function () { 1648 try { 1649 if ($scope.configValues.UseGooglePay && $scope.configValues.PayByLinkGooglePay) { 1650 $scope.psGoogle = undefined; 1651 initGooglePayButton($scope.divisionName); 1652 } 1653 } 1654 catch (error) { 1655 console.error(error); 1656 var logError = { 1657 Message: "Public Square Google Pay Init Failed PayByLink", 1658 Error: error, 1659 FileName: "angular.tsgMvc.js.publicSquareGooglePayInit" //server side strips the extension... lets keep it here 1660 }; 1661 _logService.error(logError); 1662 } 1663 } 1664 1665 $scope.submitPSCard = function () { 1666 try { 1667 if (!$scope.cardNumberElement.metadata.valid) { 1668 $scope.psApplyCardError = true; 1669 $scope.psApplyCardErrorMsg = "Card Number is required"; 1670 } 1671 else if (!$scope.cardExpirationDateElement.metadata.valid) { 1672 $scope.psApplyCardError = true; 1673 $scope.psApplyCardErrorMsg = "Expiration Date is required"; 1674 } 1675 else if (!$scope.cardVerificationCodeElement.metadata.valid) { 1676 $scope.psApplyCardError = true; 1677 $scope.psApplyCardErrorMsg = "Security Code is required"; 1678 } 1679 else { 1680 $scope.psApplyCardError = false; 1681 $scope.psApplyCardErrorMsg = undefined; 1682 $scope.toggleInlineLoading(true); 1683 var cardholderName = undefined; 1684 if ($scope.billingAddress !== undefined && $scope.billingAddress.FirstName !== undefined && $scope.billingAddress.LastName != undefined) 1685 cardholderName = ($scope.billingAddress.FirstName.trim() + " " + $scope.billingAddress.LastName.trim()).trim();
1686 if (cardholderName === undefined) 1687 cardholderName = ($scope.shippingAddress.FirstName.trim() + " " + $scope.shippingAddress.LastName.trim()).trim(); 1688 return window.publicsquare.cards.create({ 1689 cardholder_name: cardholderName, 1690 card: { 1691 number: $scope.cardNumberElement, 1692 expirationMonth: $scope.cardExpirationDateElement.month(), 1693 expirationYear: $scope.cardExpirationDateElement.year(), 1694 cvc: $scope.cardVerificationCodeElement, 1695 } 1696 }).then(function (card) { 1697 $timeout(function () { 1698 $scope.psCard = card; 1699 $scope.psCard.card_desc = getPSCardDescription(card.brand); 1700 $("#ps-card-wrapper").hide(); 1701 $scope.toggleInlineLoading(false); 1702 $timeout(function () { 1703 $scope.submitPayment(); 1704 }, 500); 1705 }, 10); 1706 }); 1707 } 1708 } catch (error) { 1709 $scope.toggleInlineLoading(false); 1710 $scope.psApplyCardError = true; 1711 $scope.psApplyCardErrorMsg = error; 1712 console.error(error); 1713 } 1714 } 1715 1716 $scope.newPaymentMethod = function () { 1717 location.reload(); 1718 } 1719 1720 $scope.toggleInlineLoading = function (loading) { 1721 $scope.inlineLoading = loading; 1722 if (loading) 1723 $('.loading').show(); 1724 else 1725 $('.loading').hide(); 1726 } 1727 1728 $scope.submitPayment = function () { 1729 if (ctrl.ccForm == null) { 1730 return false; 1731 } 1732 1733 ctrl.ccForm.$setSubmitted(); 1734 if (!ctrl.ccForm.$valid) { 1735 $scope.showFormErrors(ctrl.ccForm); 1736 return false; 1737 } 1738 1739 if ($scope.payment.PaymentMethod != undefined && $scope.payment.PaymentMethod === "ap") { // apple pay radio button is selected 1740 if ($scope.psApple == undefined) { 1741 return false; 1742 } 1743 1744 $scope.payment.PSPymt.Token = $scope.psApple.id; 1745 $scope.payment.PSPymt.Method = "apple_pay"; 1746 $scope.payment.PSPymt.AccountId = $scope.psApple.account_id; 1747 $scope.payment.PSPymt.Environment = $scope.psApple.environment; 1748 $scope.payment.PSPymt.CardNumber = $scope.psApple.last4; 1749 $scope.payment.PSPymt.ExpireMonth = $scope.psApple.exp_month; 1750 $scope.payment.PSPymt.ExpireYear = $scope.psApple.exp_year; 1751 $scope.payment.PSPymt.CardType = $scope.psApple.brand; 1752 $scope.payment.PSPymt.CardBIN = ""; // $scope.psApple.bin; 1753 } 1754 1755 if ($scope.payment.PaymentMethod != undefined && $scope.payment.PaymentMethod === "gp") { // google pay radio button is selected 1756 if ($scope.psGoogle == undefined) { 1757 return false; 1758 } 1759 1760 $scope.payment.PSPymt.Token = $scope.psGoogle.id; 1761 $scope.payment.PSPymt.Method = "google_pay"; 1762 $scope.payment.PSPymt.AccountId = $scope.psGoogle.account_id; 1763 $scope.payment.PSPymt.Environment = $scope.psGoogle.environment; 1764 $scope.payment.PSPymt.CardNumber = $scope.psGoogle.last4; 1765 $scope.payment.PSPymt.ExpireMonth = $scope.psGoogle.exp_month; 1766 $scope.payment.PSPymt.ExpireYear = $scope.psGoogle.exp_year; 1767 $scope.payment.PSPymt.CardType = $scope.psGoogle.brand; 1768 $scope.payment.PSPymt.Fingerprint = $scope.psGoogle.fingerprint; 1769 $scope.payment.PSPymt.CardBIN = ""; // $scope.psGoogle.bin; 1770 } 1771 1772 if ($scope.payment.PaymentMethod != undefined && $scope.payment.PaymentMethod === "cc") { // credit card radio button is selected 1773 if ($scope.psCard == undefined) { 1774 return false; 1775 } 1776 1777 $scope.payment.PSPymt.Token = $scope.psCard.id; 1778 $scope.payment.PSPymt.Method = "card"; 1779 $scope.payment.PSPymt.AccountId = $scope.psCard.account_id;
1780 $scope.payment.PSPymt.Environment = $scope.psCard.environment; 1781 $scope.payment.PSPymt.CardholderName = $scope.psCard.cardholder_name; 1782 $scope.payment.PSPymt.CardNumber = $scope.psCard.last4; 1783 $scope.payment.PSPymt.ExpireMonth = $scope.psCard.exp_month; 1784 $scope.payment.PSPymt.ExpireYear = $scope.psCard.exp_year; 1785 $scope.payment.PSPymt.Fingerprint = $scope.psCard.fingerprint; 1786 $scope.payment.PSPymt.CardType = $scope.psCard.brand; 1787 $scope.payment.PSPymt.CardBIN = $scope.psCard.bin; 1788 } 1789 1790 $scope.payment.PayByLinkKey = window.PayByLinkConfig.key; 1791 1792 $scope.payment.Cart = undefined; 1793 $scope.payment.CheckoutSummary = undefined; 1794 1795 $scope.payment.Prop65Acknowledged = $scope.Prop65Acknowledged; // need this on server to avoid re-prompt 1796 1797 $scope.toggleInlineLoading(true); 1798 1799 $scope.authError = undefined; 1800 1801 return _orderService.submitPayByLink($scope.payment).then(function (result) { 1802 $scope.toggleInlineLoading(false); 1803 1804 $scope.processComplete = true; 1805 1806 if (result.success) { 1807 return true; 1808 } 1809 1810 if (result.message != undefined) { 1811 $scope.message = result.message; 1812 } 1813 1814 if (result.authError) { 1815 $scope.authError = result.authError; 1816 $scope.modal = { 1817 customCssClass: "auth-error-modal", 1818 title: "Payment Error", 1819 templateUrl: "/templates/checkout/autherror.html" 1820 } 1821 $mdDialog.show($mdDialog.modal({ 1822 scope: $scope, 1823 onRemoving: function () { 1824 if ($scope.payment.PaymentMethod != undefined && $scope.payment.PaymentMethod === "pp") { 1825 $scope.removePayPal(); 1826 } 1827 } 1828 })); 1829 return false; 1830 } 1831 }); 1832 } 1833 1834 $scope.showOrderSummary = function () { 1835 if ($scope.orderSummaryShow) { 1836 $scope.orderSummaryShow = false; 1837 $scope.closeDialog(); 1838 } 1839 else { 1840 $scope.orderSummaryShow = true; 1841 $scope.modal = { 1842 customCssClass: "order-summary-modal", 1843 templateUrl: "/templates/checkout/ordersummarymodal.html" 1844 } 1845 1846 $mdDialog.show($mdDialog.modal({ 1847 scope: $scope, 1848 onRemoving: function () { 1849 $scope.orderSummaryShow = false; 1850 $scope.modal = undefined; 1851 } 1852 })); 1853 } 1854 } 1855 1856 $scope.closeDialog = function () { 1857 $mdDialog.hide(); 1858 $scope.modal = undefined; 1859 } 1860 1861 $scope.submitApplePay = function (paymentMethod) { 1862 $timeout(function () { 1863 $scope.psApple = paymentMethod; 1864 $scope.psApple.card_desc = getPSCardDescription(paymentMethod.brand); 1865 $timeout(function () { 1866 $scope.submitPayment(); 1867 }, 500); 1868 }, 10); 1869 } 1870 1871 $scope.submitGooglePay = function (paymentMethod) { 1872 $timeout(function () { 1873 $scope.psGoogle = paymentMethod; 1874 $scope.psGoogle.card_desc = getPSCardDescription(paymentMethod.brand); 1875 $timeout(function () { 1876 $scope.submitPayment(); 1877 }, 500); 1878 }, 10); 1879 } 1880} 1881 1882OrderPayByLinkController.$inject = ['$scope', '$location', '$timeout', '$mdDialog', '_orderService', '_configService', '_logService']; 1883 1884 1885; 1886var PickYourPathController = function ($scope, $mdDialog, $window) { 1887 this.$onInit = function () { 1888 $scope.isInCheckout = window.location.href.includes('checkout') ? true : false; 1889 $scope.isEligible = true; 1890 } 1891 1892 1893 // populates the Pick Your Path modal before adding to cart 1894 $scope.pickYourClubPath = function () { 1895 $scope.modal = { 1896 customCssClass: "pick-your-path-modal", 1897 title: "", 1898 templateUrl: "/templates/shared/pick-your-path-club-modal.html" 1899 } 1900 return $mdDialog.show($mdDialog.modal({ scope: $scope })); 1901 } 1902 1903 $scope.joinTrialModal = function () { 1904 $scope.modal = { 1905 customCssClass: "pick-your-path-modal", 1906 title: "", 1907 templateUrl: "/templates/shared/pick-your-path-accept-trial.html" 1908 } 1909 return $mdDialog.show($mdDialog.modal({ scope: $scope })); 1910 } 1911 1912 $scope.addClubSuccess = function () { 1913 $scope.modal = { 1914 customCssClass: "pick-your-path-modal", 1915 title: "", 1916 templateUrl: "/templates/shared/pick-your-path-accept-club.html" 1917 } 1918 return $mdDialog.show($mdDialog.modal({ scope: $scope })); 1919 } 1920 1921 $scope.addTrial = function () { 1922 $mdDialog.hide(); 1923 $scope.isInCheckout ? 1924 $scope.acceptClubOffer(false, 'ogloyaltyTrial', 'WX2', true).then(function (response) { // checkoutcontroller.js 1925 return $scope.joinTrialModal(); 1926 }) : 1927 $window.addTrialClub('WX2', 'ogloyaltyTrial', '', true, false, true).then(function (response) { 1928 $scope.isEligible = response.isEligible; 1929 return $scope.joinTrialModal(); 1930 }); 1931 } 1932 1933 $scope.addYear = function () { 1934 $mdDialog.hide(); 1935 $scope.isInCheckout ? 1936 $scope.acceptClubOffer(false, 'ogloyaltyAnnual', 'WX2', true).then(function (response) { // checkoutcontroller.js 1937 return $scope.addClubSuccess(); 1938 }) : 1939 $window.addTrialClub('WX2', 'ogloyaltyAnnual', '', true, false, true).then(function (response) { 1940 return $scope.addClubSuccess(); // anyone can get a new club, just congratulate them 1941 }); 1942 } 1943 1944 $scope.closeModal = function () { 1945 $mdDialog.hide(); 1946 if ($scope.isInCheckout) { 1947 $scope.nextStep() 1948 } 1949 } 1950} 1951 1952PickYourPathController.$inject = ['$scope', '$mdDialog', '$window'];; 1953var ViewCartController = function ($scope, $window, $mdDialog, _cartService, _configService, _userService, _certonaService, _authenticateService, $interval, $cookies, $timeout, $sce) { 1954 1955 var viewCartCtrl = this; 1956 1957 this.$onInit = function () { 1958 1959 //globals 1960 $scope.cart = undefined; 1961 $scope.configValues = undefined; 1962 $scope.userInfo = undefined; 1963 $scope.cartRecsHtml = undefined; 1964 $scope.cartSpecialsHtml = undefined; 1965 $scope.estShipLookup = {}; 1966 $scope.estShipVm = undefined; 1967 $scope.showEstShip = false; 1968 $scope.couponMessages = undefined; 1969 $scope.cartTotalWithShip = undefined; 1970 $scope.orderSummary = undefined; 1971 $scope.accountLogin = { EmailAddress: undefined, Password: undefined, LoginAttempts: 0 }; 1972 $scope.loginMessage = undefined; 1973 1974 $scope.getFreeShippingThreshold(); 1975 $scope.getCart($scope.initPayPal); 1976 $scope.getConfigValues();
1977 $scope.getUserInfo(); 1978 1979 HandleCartMoveToWishListAfterLogin(false); 1980 } 1981 1982 /************************************************** 1983 WATCHES (must go first) 1984 **************************************************/ 1985 $scope.$on("AddToCartEvent", function (event, freshCart) { 1986 //your code to handle the event here 1987 $scope.freshCartPostProcessing(freshCart); 1988 }); 1989 1990 $scope.$watch("cart.CartEntryList.length", function (value) { 1991 if (value == undefined) return false; 1992 if ($scope.cart == undefined || $scope.cart.CartEntryList.length < 1) return false; 1993 return $scope.injectTealium(); 1994 }); 1995 1996 /************************************************** 1997 PUBLIC/LAYOUT FUNCTIONS 1998 **************************************************/ 1999 $scope.getCart = function (onCompleteCallback) { // allow callers to send in a callback 2000 return _cartService.getCart().then(function (freshCart) { // get a fresh cart 2001 $scope.freshCartPostProcessing(freshCart); 2002 populateMonetateAjax(freshCart); 2003 2004 if (typeof onCompleteCallback === 'function') { 2005 onCompleteCallback(this); 2006 } 2007 }); 2008 } 2009 2010 $scope.injectTealium = function () { 2011 2012 return _cartService.setCartTealium().then(function (tealium) { 2013 $.getScript(tealium.utag).done(function () { 2014 $('#tealiumAjax').empty(); 2015 2016 //tealium loaded.. no callback :( 2017 if (typeof utag === "object" && typeof s === "object" && $("#tealiumAjax").length) { 2018 $('#tealiumAjax').append(tealium.tagParams); 2019 return false; 2020 } 2021 2022 //keep polling until tealium is loaded 2023 var tealiumInterval = $interval(function () { 2024 if (typeof utag === "object" && typeof s === "object" && $('#tealiumAjax').length) { 2025 $('#tealiumAjax').append(tealium.tagParams); 2026 $interval.cancel(tealiumInterval); 2027 tealiumInterval = undefined; 2028 } 2029 }, 100); 2030 }); 2031 }); 2032 }; 2033 2034 $scope.freshCartPostProcessing = function (freshCart) { 2035 $scope.cart = freshCart; 2036 if ($scope.orderSummary) { 2037 if ($scope.orderSummary.ShippingOut) { 2038 $scope.cart.CartTotal = Math.round((Number($scope.cart.CartTotal) + Number($scope.orderSummary.ShippingOut)) * 100) / 100; 2039 } 2040 } 2041 if ($scope.cart == undefined) return false; 2042 $scope.loadCartSliders($scope.cart.CartEntryList); // call this everytime we get the cart as the sliders contain cart-specific items 2043 } 2044 2045 $scope.getConfigValues = function () { 2046 _configService.getConfigValues().then( 2047 function (values) { 2048 $scope.configValues = values; 2049 } 2050 ); 2051 } 2052 2053 $scope.getUserInfo = function () { 2054 return _userService.getUserInfo().then( 2055 function (data) { 2056 $scope.userInfo = data; 2057 $scope.estShipLookup.zip = data.Zip ? data.Zip.substring(0, 5) : undefined; 2058 } 2059 ); 2060 } 2061 2062 $scope.getFreeShippingThreshold = function () { 2063 _cartService.getFreeShippingThreshold().then( 2064 function (result) { 2065 $scope.freeShippingThreshold = result; 2066 } 2067 ); 2068 } 2069 2070 $scope.proceedToCheckout = function () { 2071 return $window.location.replace("/checkout"); 2072 } 2073 2074 $scope.showHideEstShip = function () { 2075 $scope.showEstShip = !$scope.showEstShip ? true : false; 2076 return false; 2077 } 2078 2079 $scope.showShipingCalc = function (show) { 2080 if (show) { 2081 $("#shippingCalc").show(); 2082 } else { 2083 $("#shippingCalc").hide(); 2084 } 2085 } 2086 2087 $scope.getEstShip = function() { 2088 viewCartCtrl.estShipForm.$setSubmitted(); 2089 if (!viewCartCtrl.estShipForm.$valid) { 2090 $("#zip").focus(); 2091 return false; 2092 } 2093 2094 $scope.estShipLoading = true; 2095 return _cartService.getEstShip($scope.estShipLookup.zip).then(function (result) { 2096 $scope.estShipVm = result; 2097 $scope.orderSummary = result.EstimatedTotals; 2098 $scope.orderSummary.showShipTooltip = $scope.orderSummary.ShipAdjustments.length > 0;
2099 $scope.cart.CartTotal = Math.round((Number($scope.cart.CartTotal) + Number($scope.orderSummary.ShippingOut)) * 100) / 100; 2100 $scope.cart.CartFSQualifyTotal = Math.round((Number($scope.cart.CartTotal) + Number($scope.orderSummary.ShippingOut)) * 100) / 100; 2101 $scope.estShipLoading = false; 2102 }); 2103 } 2104 2105 $scope.newEstimate = function() { 2106 $scope.estShipLookup = { zip: undefined }; 2107 $scope.estShipVm = undefined; 2108 } 2109 2110 $scope.cartSignInSubmit = function () { 2111 viewCartCtrl.loginForm.$setSubmitted(); 2112 $scope.pageLoading = true; 2113 if (!viewCartCtrl.loginForm.$valid) { 2114 $scope.showFormErrors(viewCartCtrl.loginForm); 2115 $scope.pageLoading = false; 2116 return false; 2117 } 2118 if ($scope.accountLogin.MemberPassword === undefined || 2119 $scope.accountLogin.MemberPassword === "" || 2120 $scope.accountLogin.EmailAddress === undefined || 2121 $scope.accountLogin.EmailAddress === "") { 2122 $scope.pageLoading = false; 2123 return false; 2124 } 2125 2126 $scope.accountLogin.LoginAttempts++; 2127 if ($scope.accountLogin.LoginAttempts > 5) { 2128 $window.location.href = "/account/forgotpassword"; 2129 } else { 2130 $sce.trustAsHtml($scope.accountLogin.Password); 2131 return _authenticateService.AccountLoginCheckout($scope.accountLogin).then(function (response) { 2132 if (response.success) { 2133 $window.location.href = "/checkout"; 2134 } else if (!response.success && response.resetLegacy) { 2135 $window.location.href = "/account/forgotpassword?resetLegacy=true"; 2136 } else { 2137 $scope.pageLoading = false; 2138 $scope.loginMessage = response.responseMessage; 2139 } 2140 }); 2141 } 2142 } 2143 2144 $scope.displayPromoDisclaimer = function (id, text) { 2145 $scope.modal = { 2146 title: "Offer Details", 2147 customCssClass: "", 2148 templateUrl: "/templates/shared/coupon-promo-modal.html" 2149 } 2150 $scope.DisclaimerText = text; 2151 2152 $mdDialog.show($mdDialog.modal({ scope: $scope })); 2153 } 2154 2155 $scope.showPassword = function () { 2156 if ($('#cart-password-display').hasClass("show")) { 2157 $('#cart-password-display').removeClass("show"); 2158 $('#cart-password-display').attr("aria-label", "Hide password"); 2159 $('#cart-password-display img').attr('src', '/Images/PW_show.svg'); 2160 $('#password-input').attr("type", "password"); 2161 } else { 2162 $('#cart-password-display').addClass("show"); 2163 $('#cart-password-display').attr("aria-label", "Show password"); 2164 $('#cart-password-display img').attr('src', '/Images/PW_hide.svg'); 2165 $('#password-input').attr("type", "text"); 2166 } 2167 } 2168 2169 /************************************************** 2170 HELPER FUNCTIONS 2171 **************************************************/ 2172 $scope.initPayPal = function () { 2173 // do the INIT even if not eligible or empty cart, as the user could change states via 2174 // ajax operations (e.g. quick-view add from sliders, or ineligible item removals directly in cart). 2175 // ng-show is used in markup so the necessary elements are available and not visible 2176 if ($scope.cart == undefined) return false; 2177 if ($scope.cart.PayPalActive) { // && $scope.cart.PayPalEligible && $scope.cart.CartEntryList.length > 0) { 2178 initPayPalCheckout(); // the old function in main.js 2179 } 2180 } 2181 2182 $scope.loadCartSliders = function (cartEntries) { 2183 var itemIds = $scope.fnGetCartEntryItemIds(cartEntries).join(";"); 2184 2185 var request = { 2186 page: 'viewcart', 2187 showRV: $("#dd-recently-viewed").length > 0, 2188 showClearance: $("#dd-clearance").length > 0, 2189 showNewArrivals: $("#dd-new-arrivals").length > 0, 2190 showTopGifts: $("#dd-top-gifts").length > 0, 2191 showTopPicks: $("#dd-top-picks").length > 0,
2192 showYMAL: $("#dd-you-may-also-like").length > 0, 2193 showFPT: $("#dd-frequently-purchased-together").length > 0, 2194 showDontForget: $("#dd-dont-forget").length > 0, 2195 showTrendingNow: $("#dd-trending-now").length > 0, 2196 itemId: itemIds 2197 } 2198 2199 return _certonaService.getData(request).then(function (response) { 2200 2201 if (response.clearance) { 2202 $("#dd-clearance").html(response.clearance); 2203 initializeSlider("#dd-clearance"); 2204 hookUpQuickViews($("#dd-clearance")); 2205 } 2206 else { 2207 $("#dd-clearance").remove(); 2208 } 2209 2210 if (response.dontForget) { 2211 $("#dd-dont-forget").html(response.dontForget); 2212 initializeSlider("#dd-dont-forget"); 2213 hookUpQuickViews($("#dd-dont-forget")); 2214 } 2215 else { 2216 $("#dd-dont-forget").remove(); 2217 } 2218 2219 if (response.frequentlyPurchasedTogether) { 2220 $("#dd-frequently-purchased-together").html(response.frequentlyPurchasedTogether); 2221 initializeSlider("#dd-frequently-purchased-together"); 2222 hookUpQuickViews($("#dd-frequently-purchased-together")); 2223 } 2224 else { 2225 $("#dd-frequently-purchased-together").remove(); 2226 } 2227 2228 if (response.newArrivals) { 2229 $("#dd-new-arrivals").html(response.newArrivals); 2230 initializeSlider("#dd-new-arrivals"); 2231 hookUpQuickViews($("#dd-new-arrivals")); 2232 } 2233 else { 2234 $("#dd-new-arrivals").remove(); 2235 } 2236 2237 if (response.recentlyViewed) { 2238 $("#dd-recently-viewed").html(response.recentlyViewed); 2239 initializeSlider("#dd-recently-viewed"); 2240 hookUpQuickViews($("#dd-recently-viewed")); 2241 } 2242 else { 2243 $("#dd-recently-viewed").remove(); 2244 } 2245 2246 if (response.topGifts) { 2247 $("#dd-top-gifts").html(response.topGifts); 2248 initializeSlider("#dd-top-gifts"); 2249 hookUpQuickViews($("#dd-top-gifts")); 2250 } 2251 else { 2252 $("#dd-top-gifts").remove(); 2253 } 2254 2255 if (response.topPicks) { 2256 $("#dd-top-picks").html(response.topPicks); 2257 initializeSlider("#dd-top-picks"); 2258 hookUpQuickViews($("#dd-top-picks")); 2259 } 2260 else { 2261 $("#dd-top-picks").remove(); 2262 } 2263 2264 if (response.trendingNow) { 2265 $("#dd-trending-now").html(response.trendingNow); 2266 initializeSlider("#dd-trending-now"); 2267 hookUpQuickViews($("#dd-trending-now")); 2268 } 2269 else { 2270 $("#dd-trending-now").remove(); 2271 } 2272
2273 if (response.youMayAlsoLike) { 2274 $("#dd-you-may-also-like").html(response.youMayAlsoLike); 2275 initializeSlider("#dd-you-may-also-like"); 2276 hookUpQuickViews($("#dd-you-may-also-like")); 2277 } 2278 else { 2279 $("#dd-you-may-also-like").remove(); 2280 } 2281 2282 2283 $scope.certonaData = []; 2284 for (var prop in response) { 2285 if (Object.prototype.hasOwnProperty.call(response, prop) && prop !== 'script' && response[prop].length) { 2286 $scope.certonaData.push({ 2287 type: prop == "cartRecs" ? "You May Also Like" : prop == "cartSpecials" ? "Trending Now" : prop, 2288 sliderData: response[prop] 2289 }); 2290 } 2291 $timeout(function () { 2292 if (prop === 'script' && $("#certonaAjax").length && response[prop] && typeof $("#certonaAjax").append !== 'undefined') $("#certonaAjax").append(response[prop]); 2293 }, 250); 2294 } 2295 2296 angular.forEach($scope.certonaData, function (carousel) { 2297 carousel.slideLoaded = true; 2298 }); 2299 }); 2300 } 2301 2302 $scope.fnGetCartEntryItemIds = function (cartEntries) { // added to $scope so we can reach it from tests 2303 var arrIds = []; 2304 2305 for (var i = 0; i < cartEntries.length; i++) // for speed, per: https://stackoverflow.com/a/42059484 2306 arrIds.push(cartEntries[i].ID); 2307 2308 return arrIds; 2309 }; 2310 2311 2312 2313 $scope.closeDialog = function () { 2314 $mdDialog.hide(); 2315 $scope.modal = undefined; 2316 $scope.DisclaimerText = undefined; 2317 } 2318 2319 $scope.couponSubmit = function (couponCode) { 2320 _cartService.couponSubmit(couponCode).then(function (response) { 2321 $scope.couponMessages = response; 2322 $scope.getCart(); 2323 }); 2324 } 2325 2326 $scope.removeCoupon = function (couponCode) { 2327 _cartService.removeCoupon(couponCode).then(function (response) { 2328 $scope.couponMessages = response; 2329 $scope.getCart(); 2330 }); 2331 } 2332 2333 function initStickyMobile() { 2334 $('.site-header').css('position', 'relative'); 2335 $('#main.main').css('padding-top', '0'); 2336 $(".view-cart .view-cart-container .cart-flex-col1").addClass('exp').children().addClass('exp'); 2337 2338 $('.button-container-newcart').headtacular({ 2339 scrollPoint: $('.cart-flex-col1').offset().top + $('.cart-flex-col1').outerHeight(true), 2340 parentOffset: false 2341 }); 2342 } 2343 2344 function initStickyDesktop() { 2345 $('.cart-flex-col2').addClass('exp'); 2346 var abInterval = $interval(function () { 2347 if ($('form[name="cartEntryListCtrl.cartEntryForm"] > div:nth-child(1)').length) { 2348 $('.view-cart .view-cart-container .cart-flex-col1').headtacular({ 2349 scrollPoint: $('form[name="cartEntryListCtrl.cartEntryForm"] > div:nth-child(1)').offset().top + $('form[name="cartEntryListCtrl.cartEntryForm"] > div:nth-child(1)').outerHeight(true) + 90, 2350 parentOffset: false, 2351 whenStuck: function () { 2352 var $holder = $("<div id=\"summary-holder\" style=\"width: 320px;\"></div>"); 2353 if ($('.cart-flex-parent').length) $('.cart-flex-parent').append($holder); 2354 }, 2355 whenUnStuck: function () { 2356 if ($('#summary-holder').length) $('#summary-holder').remove(); 2357 } 2358 }); 2359 $interval.cancel(abInterval ); 2360 abInterval = undefined; 2361 } 2362 }, 100); 2363 } 2364 2365 function scrollTop() { 2366 if ($(".view-cart").length) { 2367 $('html, body').animate({ scrollTop: $(".view-cart").offset().top + 'px' }, 'slow'); 2368 } 2369 } 2370 2371 function populateMonetateAjax(freshCart) { 2372 var fullMonetateScript = ""; 2373 if (freshCart.MonetatePageScript && freshCart.MonetatePageScript.length) { 2374 window.monetatePageScript = freshCart.MonetatePageScript; 2375 fullMonetateScript = freshCart.MonetatePageScript; 2376 } 2377 if (freshCart.MonetateCartScript && freshCart.MonetateCartScript.length) { 2378 window.monetateCartScript = freshCart.MonetateCartScript; 2379 fullMonetateScript = fullMonetateScript + freshCart.MonetateCartScript; 2380 } 2381 if (fullMonetateScript && fullMonetateScript.length) { 2382 fullMonetateScript = fullMonetateScript + "<script id=\"monetateTrackData\" type=\"text/javascript\"> window.monetateQ.push([\"trackData\"]);<\/script>"; 2383 var monetateDiv = $('#monetateAjax'); 2384 monetateDiv.empty(); 2385 if (monetateDiv.length) { 2386 monetateDiv.append(fullMonetateScript); 2387 } 2388 } 2389 2390 } 2391} 2392 2393ViewCartController.$inject = ['$scope', '$window', '$mdDialog', '_cartService', '_configService', '_userService', '_certonaService', '_authenticateService', '$interval', '$cookies', '$timeout', '$sce'];; 2394var ViewWishListController = function ($scope, $window, _cartService, _configService, _userService, _wishlistService, $cookies, $mdDialog, $timeout) { 2395 2396 var viewWishListCtrl = this; 2397 2398 this.$onInit = function () { 2399 2400 //globals 2401 $scope.WishListVM = undefined; 2402 $scope.cart = undefined; // crappy name, but wishlist is based completely on the cart 2403 $scope.configValues = undefined; 2404 $scope.itemInbound = !(!$cookies.get("_wishlist-product-data")); // all of the falsey-ies 2405 $scope.copied = false; 2406 2407 if ($scope.itemInbound) { // do this before we pull down the wishlist... 2408 $scope.wishlistAddToWishList(); 2409 } 2410 2411 $scope.getWishlistModel(); 2412 $scope.getConfigValues();
2413 } 2414 2415 2416 /************************************************** 2417 WATCHES (must go first) 2418 **************************************************/ 2419 2420 2421 2422 /************************************************** 2423 PUBLIC/LAYOUT FUNCTIONS 2424 **************************************************/ 2425 $scope.getWishlistModel = function (onCompleteCallback) { // allow callers to send in a callback 2426 2427 return _wishlistService.getWishListModel($window.location.search).then(function (wishlistModel) { 2428 2429 $scope.WishListVM = wishlistModel; 2430 $scope.freshWishlistPostProcessing(wishlistModel.CartModel); 2431 2432 if (typeof onCompleteCallback === 'function') { 2433 onCompleteCallback(this); 2434 } 2435 2436 }); 2437 } 2438 2439 $scope.freshWishlistPostProcessing = function (freshWishlist) { 2440 $scope.cart = freshWishlist; 2441 $scope.cart.IsWishListPage = true; 2442 setWishlistQuantityText(); // could be improved for guest viewers 2443 2444 Gorilla.util.initForms(); 2445 2446 //wire up the Notify Me Modal 2447 setTimeout(function () { 2448 $('.notifyBtn').find("a").moby({ 2449 'modalClass': 'giveaway-modal', 2450 'ariaLabelText': 'Notify Me', 2451 'onCompleteCallback': function () { 2452 } 2453 }); 2454 }, 1000); // HMM! 2455 } 2456 2457 //Share Wish List Link Modal 2458 $scope.showShareWishListModal = function (event) { 2459 event.preventDefault(); 2460 2461 $(".sharewishlist-trigger").moby({ 2462 'modalClass': 'generic sharewishlist-modal', 2463 'bodyClose': true, 2464 'keyActions': true, 2465 'ariaLabelText': 'Share Wish List', 2466 'onBeforeCloseCallback': function () { 2467 $("#email-wishlist-form").trigger("reset"); // reset the form... 2468 var validator = $("#email-wishlist-form").validate(); 2469 validator.resetForm(); 2470 $("#email-wishlist-form label").removeClass("label-error"); 2471 $('#message-block').fadeOut("slow"); 2472 $('#message-block').html(""); 2473 }, 2474 'onCompleteCallback': function () { 2475 Gorilla.util.initForms(); 2476 2477 $("#sharewishlist-modal").find(".close-link, .moby-close").click(function (e) { 2478 e.preventDefault(); 2479 $(".sharewishlist-trigger").moby('hide'); 2480 }); 2481 } 2482 }).moby('show', '#sharewishlist-modal'); 2483 2484 return false; 2485 2486 } 2487 2488 $scope.copyToClipboard = function (event) { 2489 var inputElement = event.target; 2490 2491 // Highlight/select the text inside the input 2492 inputElement.select(); 2493 // For mobile device compatibility 2494 inputElement.setSelectionRange(0, 99999); 2495 2496 try { 2497 const copyText = inputElement.value; 2498 var successful = navigator.clipboard.writeText(copyText); 2499 if (successful) { 2500 $scope.copied = true; 2501 $timeout(function () { 2502 $scope.copied = false; 2503 }, 3000); 2504 } 2505 } catch (err) { 2506 $("#copiedMessage").text("Ctrl + C to Copy URL to Clipboard"); 2507 } 2508 } 2509 2510 $scope.wishlistAddToWishList = function () { 2511 // if the _wishlist-product-data cookie exists retrieve the data and add the item 2512 var pdCookieName = "_wishlist-product-data"; 2513 var pdCookie = $cookies.get(pdCookieName); 2514 if (!pdCookie) return; // falsey test (null, undefined, 0, false, etc.) // this should definitely never happen 2515 2516 var decodedData = atob(pdCookie); 2517 var data = JSON.parse(decodedData); 2518 $cookies.remove(pdCookieName, { path: "/" }); // path seems to be needed in this case 2519 2520 return _wishlistService.wishlistAddProductToWishList(data).then(function (results) { 2521 2522 if (!results.success) return false; 2523 2524 if (!results.maxLimitReached) { 2525 2526 //handle personalize modal 2527 if (results.personalizeHtml) { 2528 if (results.personalizeHtml.substr(0, 10) == "embroidery") {
2529 document.location.href = "/wishlist/" + results.personalizeHtml; 2530 } else if (($personalizeTrigger = $('#personalize-trigger')).length && ($personalizeModal = $('#personalize-modal')).length) { 2531 2532 $scope.getWishlistModel(); // show the wish list in the background 2533 2534 $personalizeModal.html(results.personalizeHtml); 2535 $personalizeTrigger.moby({ 2536 'modalClass': 'personalize-mod', 2537 'ariaLabelText': 'Customize Item', 2538 'onCompleteCallback': function () { 2539 Gorilla.util.initForms(); 2540 $('#personalize-mod').validate(); 2541 }, 2542 'onCloseCallback': function () { 2543 $scope.getWishlistModel(); // refresh the main display 2544 } 2545 }).moby('show', '#personalize-modal'); 2546 } 2547 } 2548 } else { 2549 //// show max wish list modal 2550 //// TODO: move to a function and call from other spots 2551 //// TODO: convert to material design 2552 $("#wish-limit-modal-trigger").moby({ 2553 'modalClass': 'wish-limit-modal gradient-gray', 2554 'ariaLabelText': 'Full Wish List', 2555 'onCompleteCallback': function () { 2556 $(".moby-close, .button.close").on('click', function (event) { 2557 event.preventDefault(); 2558 $("#wish-limit-modal-trigger").moby('hide'); 2559 }); 2560 } 2561 }).moby('show', '#wish-limit-modal'); 2562 } 2563 }); 2564 }; 2565 2566 $scope.displayPromoDisclaimer = function (id, text) { 2567 $scope.modal = { 2568 title: "Offer Details", 2569 customCssClass: "", 2570 templateUrl: "/templates/shared/coupon-promo-modal.html" 2571 } 2572 $scope.DisclaimerText = text; 2573 2574 $mdDialog.show($mdDialog.modal({ scope: $scope })); 2575 } 2576 2577 $scope.getConfigValues = function () { 2578 _configService.getConfigValues().then( 2579 function (values) { 2580 $scope.configValues = values; 2581 } 2582 ); 2583 } 2584 2585 /************************************************** 2586 HELPER FUNCTIONS 2587 **************************************************/ 2588 $scope.closeDialog = function () { 2589 $mdDialog.hide(); 2590 $scope.modal = undefined; 2591 $scope.DisclaimerText = undefined; 2592 } 2593 2594} 2595 2596ViewWishListController.$inject = ['$scope', '$window', '_cartService', '_configService', '_userService', '_wishlistService', '$cookies', '$mdDialog', '$timeout'];; 2597var BlogCategoryController = function ($scope, $window, $routeParams, _blogService) { 2598 2599 var ctrl = this; 2600 2601 this.$onInit = function () { 2602 2603 $scope.vm = {}; 2604 $scope.category = $routeParams.category ? $routeParams.category : undefined; 2605 $scope.c = $routeParams.c ? $routeParams.c : undefined; 2606 $scope.subCats = []; 2607 $scope.types = []; 2608 2609 if (typeof $scope.c === 'undefined' || $scope.c == null || $scope.c <= 0) { 2610 $window.location.href = '/blog'; 2611 } 2612 getCategoryData(); 2613 2614 $scope.sortByOptions = ['Newest', 'Oldest']; 2615 $scope.SortBy = 'Newest'; 2616 2617 window.addEventListener('resize', setEqualHeightArticleCards); 2618 } 2619 2620 $scope.$on('article:ready', function () { 2621 setEqualHeightArticleCards(); 2622 //setMonetateScript(); 2623 }); 2624 2625 $scope.$watch('vm.ArticleTypes', function () { 2626 if (typeof $scope.vm.ArticleTypes !== 'undefined') { 2627 if ($scope.vm.ArticleTypes.every((type) => type.Selected !== true)) 2628 $scope.vm.Articles.forEach((el) => { el.ShowType = true; }); 2629 } 2630 }, true); 2631 2632 $scope.$watch('vm.BlogCategory.SubCategories', function () { 2633 if (typeof $scope.vm.BlogCategory !== 'undefined' && typeof $scope.vm.BlogCategory.SubCategories !== 'undefined') { 2634 if ($scope.vm.BlogCategory.SubCategories.every((subCat) => subCat.Selected !== true))
2635 $scope.vm.Articles.forEach((el) => { el.ShowSubCat = true; }); 2636 } 2637 }, true); 2638 2639 $scope.$watch('SortBy', function (newValue, oldValue) { 2640 if (newValue === oldValue) { 2641 return false; 2642 } 2643 2644 if (newValue === 'Newest' || newValue === 'Oldest') { 2645 $scope.vm.Articles = $scope.vm.Articles.reverse(); 2646 } 2647 }); 2648 2649 function getCategoryData() { 2650 _blogService.getBlogCatagoryData($scope.c).then(function (data) { 2651 $scope.vm = data.model; 2652 $scope.vm.Articles.forEach((el) => { el.ShowSubCat = true; el.ShowType = true; }) 2653 getSubcategoryArticleCount(); 2654 }); 2655 } 2656 2657 function getSubcategoryArticleCount() { 2658 $scope.vm.BlogCategory.SubCategories.forEach((subcat) => { 2659 let count = 0; 2660 $scope.vm.Articles.forEach((article) => { 2661 article.BlogCategories[0].SubCategories.forEach((elem) => { 2662 if (subcat.Id === elem.Id) count++; 2663 }); 2664 subcat.Count = count; 2665 }); 2666 }); 2667 } 2668 2669 $scope.setSubcategory = function () { 2670 2671 $scope.subCats = $scope.vm.BlogCategory.SubCategories.filter(function (subCat) { 2672 return subCat.Selected; 2673 }); 2674 2675 $scope.vm.Articles.forEach((article) => { 2676 article.ShowSubCat = article.BlogCategories[0].SubCategories.find((subCat) => { 2677 return $scope.subCats.find((selectedSubCat) => { return selectedSubCat.Id == subCat.Id }); 2678 }); 2679 }); 2680 2681 //setMonetateScript(); 2682 } 2683 2684 $scope.setTypeFilter = function () { 2685 2686 $scope.types = $scope.vm.ArticleTypes.filter(function (type) { 2687 return type.Selected; 2688 }); 2689 2690 $scope.vm.Articles.forEach((article) => { 2691 article.ShowType = article.Types.find((type) => { 2692 return $scope.types.find((selectedType) => { return selectedType.Id == type.Id }); 2693 }); 2694 }); 2695 2696 //setMonetateScript(); 2697 } 2698 2699 function setEqualHeightArticleCards() { 2700 const items = Array.from(document.getElementsByClassName('article-card')); 2701 const baseOffset = items[0].offsetTop; 2702 const breakIndex = items.findIndex(function (item) { return item.offsetTop > baseOffset; }); 2703 const chunk = (breakIndex === -1 ? items.length : breakIndex); 2704 2705 if (chunk === 1) { 2706 $(items).find('.article-media, .article-info, .article-types, .rating-box, .starting-at').css({ 'min-height': '0' }); 2707 return false; 2708 } 2709 2710 const subsets = []; 2711 var startIndex = 0; 2712 var endIndex = 0; 2713 var checkOffset = baseOffset; 2714 for (var i = 0; i < items.length; i += 1) { 2715 var currOffset = items[i].offsetTop; 2716 if (currOffset > checkOffset + 50) { //start of new row, tiles have 1 pixel border, double wide does not so use +50 to be safe 2717 subsets.push(items.slice(startIndex, endIndex + 1)); 2718 startIndex = i; 2719 endIndex = i; 2720 checkOffset = currOffset; 2721 } 2722 else { 2723 endIndex = i; 2724 } 2725 } 2726 subsets.push(items.slice(startIndex, endIndex + 1)); //add the last row 2727 2728 return subsets.forEach(function (subset) { 2729 const $subset = $(subset); 2730 const articleImgHeight = Math.max.apply(null, $subset.find(".article-media").map(function () { return $(this).height(); }).get()); 2731 const articleInfoHeight = Math.max.apply(null, $subset.find(".article-info").map(function () { return $(this).height(); }).get()); 2732 const articleTypesHeight = Math.max.apply(null, $subset.find(".article-types").map(function () { return $(this).height(); }).get()); 2733 const articleTitleHeight = Math.max.apply(null, $subset.find(".article-title").map(function () { return $(this).height(); }).get()); 2734 const articleRatingsHeight = Math.max.apply(null, $subset.find(".article-ratings").map(function () { return $(this).height(); }).get()); 2735 2736 $subset.find(".article-media").css({ "min-height": articleImgHeight });
2737 $subset.find(".article-info").css({ "min-height": articleInfoHeight }); 2738 $subset.find(".article-types").css({ "min-height": articleTypesHeight }); 2739 $subset.find(".article-title").css({ "min-height": articleTitleHeight }); 2740 $subset.find(".article-ratings").css({ "min-height": articleRatingsHeight }); 2741 }); 2742 } 2743 2744 function setMonetateScript() { 2745 return _blogService.getMonetateScript().then(function (data) { 2746 if (data) { 2747 let monetateDiv = $('#monetateAjax'); 2748 monetateDiv.empty(); 2749 if (monetateDiv.length) { 2750 monetateDiv.append(data.monetateScript); 2751 } 2752 } 2753 }); 2754 } 2755} 2756 2757BlogCategoryController.$inject = ['$scope', '$window', '$routeParams', '_blogService'];; 2758var BlogHomeController = function ($scope, $location, $http, _blogService) { 2759 2760 //var ctrl = this; 2761 2762 this.$onInit = function () { 2763 2764 $scope.vm = {}; 2765 $scope.getBlogHomeData(); 2766 2767 if ($location.path() !== '/blog') { 2768 $location.path('/blog'); 2769 } 2770 } 2771 2772 $scope.getBlogHomeData = function () { 2773 2774 return _blogService.getBlogHomeData().then(function (data) { 2775 if (data === undefined) { 2776 return false; 2777 } 2778 2779 $scope.vm = data; 2780 $scope.title = $scope.vm.WebPage.MetaTitle; 2781 $scope.metaDesc = $scope.vm.WebPage.MetaDescription; 2782 2783 populateMetaInfo(); 2784 }); 2785 } 2786 2787 function populateMetaInfo() { 2788 document.getElementsByTagName('title')[0].innerHTML = $scope.title.toTitleCase() + " | Play Baseball"; 2789 document.querySelectorAll("meta[name='Title']")[0].content = "Sportsman's Guide - " + $scope.title.toTitleCase(); 2790 2791 if ($scope.metaDesc) { 2792 var $metaDescTag = document.querySelectorAll("meta[name='Description']")[0]; 2793 if (!$metaDescTag) { 2794 $("head").append('<meta name=Description content="' + $scope.metaDesc + '"/>'); 2795 } 2796 else { 2797 $metaDescTag.content = $scope.metaDesc; 2798 } 2799 } 2800 2801 } 2802 2803} 2804 2805BlogHomeController.$inject = ['$scope', '$location', '$http', '_blogService'];; 2806var CustomerServiceController = function($scope, $window, $location) { 2807 var csCtrl = this; 2808 2809 this.$onInit = function () { 2810 $scope.customerServicePages = []; 2811 $scope.customerServicePages.push({ label: "Self Service", value: "/customerservice" }); 2812 $scope.customerServicePages.push({ label: "Manage Orders", value: "/customerservice/orderstatuslookup" }); 2813 $scope.customerServicePages.push({ label: "Returns Made Easy", value: "/customerservice/returnsmadeeasy" }); 2814 //$scope.customerServicePages.push({ label: "Club Membership", value: "/club/managemembership" }); 2815 $scope.customerServicePages.push({ label: "Email Preferences", value: "/customerservice/emailpreferences" }); 2816 $scope.customerServicePages.push({ label: "My Account", value: "/account/accountdashboard" }); 2817 $scope.customerServicePages.push({ label: "Customer Service", value: "/customerservice/contactus" }); 2818 $scope.customerServicePages.push({ label: "Lowest Price Guarantee", value: "/customerservice/lowestpriceguarantee" }); 2819 $scope.customerServicePages.push({ label: "FAQs", value: "/customerservice/faqs" }); 2820 $scope.customerServicePages.push({ label: "Return Policy", value: "/customerservice/returnpolicy" }); 2821 $scope.customerServicePages.push({ label: "California Supply Chain Act", value: "/customerservice/californiasupplychainact" }); 2822 //$scope.customerServicePages.push({ label: "Product Safety Recalls", value: "/customerservice/productsafetyrecalls" }); 2823 //$scope.customerServicePages.push({ label: "Product Shipping Restrictions", value: "PShR" }); 2824 2825 $scope.csPage = $location.path(); 2826 } 2827 2828 $scope.changePage = function () { 2829 if ($scope.csPage === "PShR") { 2830 $window.open('https://image.sportsmansguide.com/image/pdf/productshippingrestrictions.pdf', '_blank'); 2831 } else { 2832 $window.location.href = $scope.csPage; 2833 } 2834 } 2835} 2836 2837CustomerServiceController.$inject = ['$scope', '$window', '$location'];; 2838var EmailUsController = function ($scope, $mdDialog) { 2839 2840 $scope.showDialog = function (success) { 2841 $scope.success = success; 2842 2843 $scope.modal = { 2844 customCssClass: '', 2845 title: 'Email Us', 2846 templateUrl: "/templates/customerservice/email-us-form-modal.html" 2847 } 2848 2849 $mdDialog.show($mdDialog.modal({ scope: $scope })); 2850 } 2851 2852 $scope.closeDialog = function () { 2853 $mdDialog.hide(); 2854 } 2855} 2856 2857EmailUsController.$inject = ['$scope', '$mdDialog'];; 2858var FindCustNumController = function ($scope, $mdDialog, _customerServiceService) { 2859 2860 var ctrl = this; 2861 $scope.vm = { 2862 email: undefined, 2863 clickCount: 0, 2864 clickMax: 5 2865 }; 2866 2867 $scope.showLookupModal = function ($event) { 2868 $event.preventDefault(); 2869 2870 $scope.modal = { 2871 title: 'Find Customer Number', 2872 customCssClass: 'find-cust-num-modal', 2873 templateUrl: "/templates/customerservice/find-cust-num-modal.html" 2874 } 2875 2876 $mdDialog.show($mdDialog.modal({ scope: $scope })); 2877 } 2878 2879 $scope.findCustNum = function () { 2880 ctrl.frm.$setSubmitted(); 2881 if (!ctrl.frm.$valid) { 2882 $scope.showFormErrors(); 2883 return false; 2884 } 2885 2886 //until we get some captcha or something 2887 $scope.vm.clickCount++; 2888 if ($scope.vm.clickCount === $scope.vm.clickMax) { 2889 $scope.vm.message = "You have exceeded the maximum attempts. Please refresh the page to try again."; 2890 return false; 2891 } 2892 2893 return _customerServiceService.findCustNum($scope.vm.email).then(function (custNum) { 2894 if (custNum && custNum > 0) { 2895 $scope.vm.message = 2896 "An email containing your customer number has been sent to the email address provided. Please allow a few minutes for delivery."; 2897 return false; 2898 } 2899 2900 $scope.vm.message = "We couldn’t find an account associated with this email."; 2901 return false; 2902 }); 2903 } 2904 2905 $scope.showFormErrors = function () { 2906 var errEl = angular.element('input.ng-invalid, md-checkbox.ng-invalid, md-select.ng-invalid, md-radio-group.ng-invalid').first(); 2907 if (errEl) { 2908 errEl.focus(); 2909 if (errEl[0]) { window.scrollTo(0, errEl[0].documentOffsetTop() - (window.innerHeight / 2)); } 2910 } 2911 2912 angular.forEach(ctrl.frm.$error, function (field) { 2913 angular.forEach(field, function (errorField) { 2914 errorField.$setTouched(); 2915 }); 2916 }); 2917 } 2918 2919 $scope.closeDialog = function () { 2920 $mdDialog.hide(); 2921 $scope.modal = undefined; 2922 } 2923 2924} 2925 2926FindCustNumController.$inject = ['$scope', '$mdDialog', '_customerServiceService'];; 2927var MakePaymentController = function ($scope, $window, $interval, _customerServiceService, _logService) { 2928 2929 var makePaymentCtrl = this; 2930 2931 this.$onInit = function () { 2932 $scope.declineData = $window.initData; 2933 $scope.loading = false; 2934 2935 2936 var dropInIntv = $interval(function () { 2937 if (angular.element(document.querySelector('#chase-make-payment-drop-in')).length > 0) { 2938 getChaseDropIn(); 2939 $interval.cancel(dropInIntv); 2940 } 2941 }, 500); 2942 } 2943 2944 function getChaseDropIn() { 2945 2946 if ($scope.declineData.ChaseToken === "" || $scope.declineData.ChaseToken == undefined) { 2947 $scope.chaseError = true; 2948 return false; 2949 } 2950 2951 if ($window.dropInUI) $window.dropInUI.unmount(); 2952 2953 $window.dropInUI = new DropInUI({ 2954 checkoutSessionToken: $scope.declineData.ChaseToken, 2955 controlledSubmit: true, 2956 themeValueOverrides: { 2957 color: { 2958 brand: "#252a2f", 2959 border: "#54565A", 2960 interactive: "#D54400", 2961 primaryText: "#54565A" 2962 }, typography: { 2963 fontFamily: "'figtree', helvetica, arial, sans-serif" 2964 } 2965 } 2966 }); 2967
2968 $window.dropInUI.mount("chase-make-payment-drop-in"); 2969 2970 var makePaymentEl = document.getElementById("make-payment-btn"); 2971 var makePaymentHandler = function () { $window.dropInUI.submit(); }; 2972 if (makePaymentEl.getAttribute('listener') !== 'true') { 2973 makePaymentEl.addEventListener("click", makePaymentHandler, { once: true }); 2974 } 2975 2976 if ($window.unsubscribeChaseEvents != undefined) $window.unsubscribeChaseEvents(); 2977 $window.unsubscribeChaseEvents = $window.dropInUI.subscribe((announcement) => { 2978 if (announcement.namespace === "payment" && announcement.level === "info") { 2979 if (announcement.message === "PaymentSuccess") { 2980 $scope.declineData.DeclineStatus = 'A'; 2981 var dropInEl = document.getElementById('chase-drop-in-wrapper'); 2982 if (dropInEl) dropInEl.style.display = "none"; 2983 $scope.$apply(); 2984 } 2985 } 2986 2987 if (announcement.message === "PaymentUnsuccessful") { 2988 $scope.declineData.DeclineStatus = 'U'; 2989 2990 var logError = { 2991 Message: announcement.message, 2992 Error: announcement.namespace, 2993 FileName: "MakePaymentController" 2994 }; 2995 2996 _logService.error(logError); 2997 } 2998 2999 if (announcement.level === "error") { 3000 $scope.declineData.DeclineStatus = 'U'; 3001 3002 var logError = { 3003 Message: announcement.message, 3004 Error: announcement.namespace, 3005 FileName: "MakePaymentController" 3006 }; 3007 3008 _logService.error(logError); 3009 } 3010 }); 3011 } 3012} 3013 3014MakePaymentController.$inject = ['$scope', '$window', '$interval', '_customerServiceService', '_logService'];; 3015var OrderListController = function ($scope, $window, $location){ 3016 3017 this.$onInit = function () { 3018 $scope.loading = true; 3019 $scope.vm = {}; 3020 $scope.vm.orders = $window.orderList; 3021 $scope.vm.inProgressOrders = []; 3022 $scope.vm.previousOrders = []; 3023 $scope.vm.searchOrders = []; 3024 $scope.vm.showBackOrderMsg = false; 3025 $scope.vm.isSearching = false; 3026 $scope.vm.dateFilterDropDown = []; 3027 $scope.vm.dateFilter = ""; 3028 $scope.vm.searchTerm = ""; 3029 $scope.vm.ddFilterValue = "Last 3 months"; 3030 $scope.vm.searchKey = ""; 3031 $scope.vm.recallOrders = []; 3032 3033 processOrders(); 3034 } 3035 3036 function processOrders() { 3037 var qp = $location.search(); 3038 angular.forEach($scope.vm.orders, function (element) { 3039 3040 var newDate = moment.utc(element.OrderDate); 3041 element.OrderDate = new Date(newDate.format('M/D/YYYY')); 3042 3043 var year = newDate.format('YYYY'); 3044 if (!$scope.vm.dateFilterDropDown.includes(year) && year > 1) { 3045 $scope.vm.dateFilterDropDown.push(year); 3046 } 3047 element.detailsLink = "/customerservice/orderstatusdetail/?orderNumber=" + element.OrderNumber + "&customerNumber=" + qp.CustomerNumber + "&BillingLastName=" + qp.BillingLastName + "&BillingZipCode=" + qp.BillingZipCode; 3048 }); 3049 if ($scope.vm.orders) { 3050 $scope.splitOrdersToDisplay(""); 3051 } 3052 3053 $scope.vm.recallOrders = $scope.vm.orders.filter(function (order) { 3054 return order.OrderItems.some(function (item) { 3055 return item.IsRecalledItem == "Y"; 3056 }); 3057 }); 3058 } 3059 3060 $scope.submitSearch = function () { 3061 if ($scope.vm.searchKey == "" || $scope.vm.searchKey == undefined) { return false; } 3062 if (!$scope.vm.orders) { 3063 alert("No Orders to Search"); 3064 return false; 3065 } 3066 3067 $scope.loading = true; 3068 $scope.vm.isSearching = true; 3069 $scope.vm.searchOrders = []; 3070 $scope.vm.searchTerm = angular.copy($scope.vm.searchKey); 3071 3072 var onlyNum = /^\d+$/.test($scope.vm.searchKey); 3073 3074 $scope.vm.orders.filter(function (element) { 3075 //see if that item exists on the order 3076 var orderToCheck = angular.copy(element); 3077 var itemsToAdd = []; 3078 3079 element.OrderItems.filter(function (item) { 3080 3081 if (onlyNum) { //check item numbers if only numbers 3082 if ((item.ID + '').indexOf($scope.vm.searchKey) > -1) { 3083 itemsToAdd.push(item); 3084 } 3085 } 3086 else { //check item names 3087 if ((item.Name.toLowerCase()).indexOf($scope.vm.searchKey.toLowerCase()) > -1) { 3088 itemsToAdd.push(item); 3089 } 3090 } 3091 }); 3092 3093 //if an item exists, add that order and that item 3094 if (itemsToAdd.length > 0) { 3095 orderToCheck.TotalItems = orderToCheck.OrderItems.length; 3096 orderToCheck.OrderItems = itemsToAdd; 3097 $scope.vm.searchOrders.push(orderToCheck); 3098 } 3099 }); 3100 $scope.loading = false; 3101 angular.element(document.querySelector('#search-button')).focus(); 3102 } 3103 3104 $scope.getOrderByOrderNumber = function (orderNumber) { 3105 $scope.loading = true; 3106 $scope.vm.isSearching = true; 3107 $scope.vm.searchOrders = []; 3108 3109 $scope.vm.recallOrders.filter(function (order) { 3110 var orderToCheck = angular.copy(order); 3111 3112 if ((order.OrderNumber) === orderNumber) { 3113 $scope.vm.searchOrders.push(orderToCheck); 3114 } 3115 }); 3116 $scope.loading = false; 3117 angular.element(document.querySelector('#search-button')).focus(); 3118 } 3119 3120 $scope.filterByDate = function () { 3121 if ($scope.vm.dateFilter == "") 3122 $scope.vm.ddFilterValue = "Last 3 months"; 3123 else 3124 $scope.vm.ddFilterValue = $scope.vm.dateFilter; 3125 3126 $scope.loading = true; 3127 $scope.splitOrdersToDisplay($scope.vm.dateFilter); 3128 } 3129 3130 $scope.splitOrdersToDisplay = function (splitType) { 3131 $scope.vm.inProgressOrders = []; 3132 $scope.vm.previousOrders = []; 3133 3134 if (splitType == "") { 3135 //split orders and show within the last three months 3136 $scope.vm.orders.filter(function (element) { 3137 var newdate = new Date(); 3138 newdate.setMonth(newdate.getMonth() - 3); 3139 if (element.OrderDate >
3139 newdate) { 3140 if (element.OrderStatus == "IN PROCESS" || element.CustStatus == "OIS") 3141 $scope.vm.inProgressOrders.push(element); 3142 else 3143 $scope.vm.previousOrders.push(element); 3144 } 3145 3146 }); 3147 3148 } 3149 else { 3150 //split orders and show the specific year 3151 $scope.vm.orders.filter(function (element) { 3152 var year = element.OrderDate.getYear(); 3153 if (year < 0) { year = 1900 - year; } 3154 else { year = year + 1900; } 3155 3156 if (year == splitType) { 3157 if (element.OrderStatus == "IN PROCESS" || element.CustStatus == "OIS") 3158 $scope.vm.inProgressOrders.push(element); 3159 else 3160 $scope.vm.previousOrders.push(element); 3161 } 3162 }); 3163 } 3164 $scope.loading = false; 3165 } 3166 3167 $scope.clearSearch = function () { 3168 angular.element(document.querySelector('#search-orders')).focus(); 3169 $scope.vm.isSearching = false; 3170 $scope.vm.searchTerm = ""; 3171 $scope.vm.searchOrders = []; 3172 $scope.loading = false; 3173 $scope.vm.searchKey = ""; 3174 } 3175} 3176 3177OrderListController.$inject = ['$scope', '$window', '$location'];; 3178var OrderStatusTableController = function ($scope, $mdDialog, _orderService) { 3179 3180 $scope.cancelMultiItems = function (entireOrder) { 3181 if (window.orderVm.InProcessOrder) { 3182 $scope.modal = { 3183 title: 'Order Submittal In Process', 3184 customCssClass: 'bo-cancel-modal', 3185 templateUrl: "/templates/customerservice/in-process-order-modal.html" 3186 } 3187 3188 return $mdDialog.show($mdDialog.modal({ scope: $scope })); 3189 } 3190 3191 $scope.cancelRequestSent = false; 3192 $scope.CancelItemsList = []; 3193 if (entireOrder) { 3194 $scope.CancelItemsList = window.orderVm.OrderItemList; 3195 } else { 3196 $("input[type='checkbox'][class='cancel-checkbox'][id$=__IsSelected]:checked").each(function () { 3197 var checkedItem = $(this); 3198 if (checkedItem && checkedItem.length > 0) { 3199 var itemIndex = checkedItem[0].id; 3200 itemIndex = itemIndex.replace("OrderItemList_", "").replace("__IsSelected", ""); 3201 window.orderVm.OrderItemList[itemIndex].ItemIndex = itemIndex; 3202 $scope.CancelItemsList.push(window.orderVm.OrderItemList[itemIndex]); 3203 } 3204 }); 3205 } 3206 3207 if (entireOrder || window.orderVm.OrderItemList.length == $scope.CancelItemsList.length) { 3208 $scope.CancelEntireOrder = true; 3209 $scope.modal = { 3210 title: 'Cancel Order', 3211 customCssClass: 'bo-cancel-modal', 3212 templateUrl: "/templates/customerservice/cancel-items-request-modal.html" 3213 } 3214 3215 return $mdDialog.show($mdDialog.modal({ scope: $scope })); 3216 } else { 3217 $scope.CancelEntireOrder = false; 3218 $scope.modal = { 3219 title: 'Cancel Items', 3220 customCssClass: 'bo-cancel-modal', 3221 templateUrl: "/templates/customerservice/cancel-items-request-modal.html" 3222 } 3223 3224 return $mdDialog.show($mdDialog.modal({ scope: $scope })); 3225 } 3226 } 3227 3228 $scope.sendCancelItemsRequest = function () { 3229 var cancelItems = { 3230 FirstName: window.orderVm.Billing.FirstName, 3231 LastName: window.orderVm.Billing.LastName, 3232 ZipCode: window.orderVm.Billing.Zip, 3233 EmailAddress: window.orderVm.EmailAddress, 3234 OrderNumber: window.orderVm.OrderNumber, 3235 OrderNumberPrefix: window.orderVm.OrderNumberPrefix, 3236 CustomerNumber: window.orderVm.CustomerNumber, 3237 CancelEntireOrder: $scope.CancelEntireOrder 3238 }; 3239 3240 cancelItems.CancelItemList = []; 3241 for (var i = 0; i < $scope.CancelItemsList.length; i++) { 3242 cancelItems.CancelItemList.push({ LineNumber: $scope.CancelItemsList[i].LineNumber, C
3242ancelItemIndex: $scope.CancelItemsList[i].ItemIndex, Sku: $scope.CancelItemsList[i].Sku }) 3243 } 3244 3245 return _orderService.cancelMultiItemRequest(cancelItems).then( 3246 function (data) { 3247 $scope.requestError = data.request.ErrorMessage; 3248 $scope.EmailAddress = cancelItems.EmailAddress; 3249 $scope.cancelRequestSent = true; 3250 3251 for (var i = 0; i < $scope.CancelItemsList.length; i++) { 3252 var $cancelItem = $('#OrderItemList_' + $scope.CancelItemsList[i].ItemIndex + '__IsSelected'); 3253 $(".cancel-items-button").attr("disabled", true); 3254 $cancelItem.closest('tr').find('*[data-header="Status"]').html("<span>Pending Cancellation</span>"); 3255 $cancelItem.closest('.cancel-column').remove(); 3256 } 3257 } 3258 ); 3259 } 3260 3261 $scope.closeDialog = function () { 3262 $mdDialog.hide(); 3263 $scope.backOrder = undefined; 3264 $scope.cancelResponse = undefined; 3265 $scope.itemName = ""; 3266 $scope.cancelReqSent = false; 3267 $scope.cancelRequest = undefined; 3268 $scope.target = undefined; 3269 3270 $scope.CancelItemsList = []; 3271 $scope.cancelRequestSent = false; 3272 $scope.requestError = false; 3273 3274 $scope.transactionData = ""; 3275 } 3276} 3277 3278OrderStatusTableController.$inject = ['$scope', '$mdDialog', '_orderService'];; 3279var OrderTrackingController = function ($scope, $sce, $location, $interval, _orderService, _certonaService, $timeout) { 3280 3281 var ctrl = this; 3282 3283 ctrl.$onInit = function () { 3284 var qp = $location.search(); 3285 if (qp.orderNumber == undefined || qp.trackingNumber == undefined) return false; 3286 3287 if (qp.trackingNumber.includes('OV')) qp.trackingNumber = qp.trackingNumber.replace('OV', ''); 3288 3289 return _orderService.getOrderTracking(qp.orderNumber, qp.trackingNumber).then(function (response) { 3290 $scope.vm = response; 3291 //delivery date is a string, format to a javascript date object 3292 if ($scope.vm != undefined && $scope.vm.order != undefined && $scope.vm.order.OrderTrackingModel != undefined && $scope.vm.order.OrderTrackingModel.ScheduledDeliveryDate) { 3293 $scope.vm.order.OrderTrackingModel.today = moment().toDate(); 3294 var parsedDate = moment($scope.vm.order.OrderTrackingModel.ScheduledDeliveryDate); 3295 $scope.vm.order.OrderTrackingModel.parsedDeliveryDate = parsedDate.toDate(); 3296 3297 if ($scope.vm.order.OrderTrackingModel.parsedDeliveryDate) { 3298 if (moment(parsedDate).isSame(moment(), 'month') && 3299 moment(parsedDate).isSame(moment(), 'day') && 3300 moment(parsedDate).isSame(moment(), 'year')) { 3301 $scope.vm.order.OrderTrackingModel.daysToDelivery = moment(parsedDate).diff(moment(), 'days'); 3302 } else { 3303 $scope.vm.order.OrderTrackingModel.daysToDelivery = moment(parsedDate).diff(moment(), 'days') + 1; 3304 } 3305 } 3306 } 3307 }); 3308 3309 } 3310 3311 $scope.isNaN = function (value) { 3312 return isNaN(value); 3313 } 3314 3315 $scope.$on('calendar:ready', function () { 3316 var interval = $interval(function () { 3317 var selectedDate = document.querySelector(".md-calendar-selected-date"); 3318 if (!selectedDate) return false; 3319 $interval.cancel(interval); 3320 3321 var parentEl = selectedDate.parentElement.parentElement; 3322 var elems = Array.from(document.querySelectorAll(".md-calendar-scroll-container table tbody")); 3323 var index = elems.findIndex(function (el) { return el === parentEl }); 3324 if (index > -1) { 3325 for (var i = 0; i < elems.length; i++) { 3326 if (i > index) elems[i].style.visibility = "hidden"; 3327 } 3328 } 3329 3330 var monthLabel = parentEl.querySelector(".md-calendar-scroll-container .md-calendar-month-label"); 3331 monthLabel.nextSibling ? monthLabel.children[0].style.display = "none" : monthLabel.style.display = "none"; 3332 }, 100); 3333 });
3334 3335 $scope.$on('certona:ready', function () { 3336 3337 var request = { 3338 page: 'ordertracking', 3339 showRv: $scope.vm.certona.Widgets[0].Objects[0].Text === "RV", 3340 showClearance: $scope.vm.certona.Widgets[0].Objects[0].Text === "CL", 3341 showNewArrivals: $scope.vm.certona.Widgets[0].Objects[0].Text === "NA", 3342 showTopGifts: $scope.vm.certona.Widgets[0].Objects[0].Text === "TGFY", 3343 showTopPicks: $scope.vm.certona.Widgets[0].Objects[0].Text === "TPFY" 3344 } 3345 3346 return _certonaService.getData(request).then(function (response) { 3347 for (var prop in response) { 3348 if (Object.prototype.hasOwnProperty.call(response, prop) && prop !== 'script' && response[prop].length) { 3349 $scope.vm.certonaData = { 3350 type: prop, 3351 sliderData: response[prop] 3352 }; 3353 } 3354 $timeout(function () { 3355 if (prop === 'script' && $("#certonaAjax").length && response[prop] && typeof $("#certonaAjax").append !== 'undefined') $("#certonaAjax").append(response[prop]); 3356 }, 250); 3357 } 3358 3359 //ng-if bound to this injects the slider content and the slider is now created 3360 if ($scope.vm.certonaData) $scope.vm.certonaData.slideLoaded = true; 3361 }); 3362 }); 3363} 3364 3365OrderTrackingController.$inject = ['$scope', '$sce', '$location', '$interval', '_orderService', '_certonaService', '$timeout'];; 3366var SummaryLookupController = function ($scope, $document, _customerServiceService) { 3367 3368 var summaryCtrl = this; 3369 3370 this.$onInit = function () { 3371 $scope.vm = {}; 3372 $scope.request = { lastName: undefined, customerNumber: undefined, phoneNumber: undefined }; 3373 $scope.submittedReq = false; 3374 } 3375 3376 $scope.submitSummaryRequest = function () { 3377 summaryCtrl.lookupForm.$setSubmitted(); 3378 $scope.vm = {}; 3379 3380 if (!summaryCtrl.lookupForm.$valid) { 3381 var errEl = angular.element('form input.ng-invalid').first(); 3382 if (errEl) errEl.focus(); 3383 angular.forEach(summaryCtrl.lookupForm.$error, function (field) { 3384 angular.forEach(field, function (errorField) { 3385 errorField.$setTouched(); 3386 }); 3387 }); 3388 3389 return false; 3390 } 3391 3392 return _customerServiceService.getCreditTransactions($scope.request.lastName, $scope.request.customerNumber, $scope.request.phoneNumber).then( 3393 function (response) { 3394 $scope.vm = response.model; 3395 if (!$scope.vm.ErrorMsg.length) $scope.submittedReq = true; 3396 }); 3397 } 3398 3399 $scope.oneIsRequired = function () { 3400 return !($scope.request.customerNumber || $scope.request.phoneNumber); 3401 }; 3402 3403 $document.ready(function () { 3404 $('#LastName, #CustomerNumber, #PhoneNumber').on("keyup keypress", function (e) { 3405 if (e.keyCode == 13) { 3406 e.preventDefault(); 3407 $('#summarySubmit').click(); 3408 } 3409 }); 3410 }); 3411} 3412 3413SummaryLookupController.$inject = ['$scope', '$document','_customerServiceService'];; 3414var AccountCredentialsController = function ($scope, _authenticateService, $window) { 3415 this.$onInit = function () { 3416 $scope.loading = false; 3417 $scope.accountCredentials = {}; 3418 $scope.accountCredentials = { 3419 CurrentEmailAddress: $window.currentEmailAddy 3420 }; 3421 $scope.CustomerNumber = $window.CustomerNumber; 3422 $scope.userFirstName = $window.userFirstName; 3423 } 3424 3425 $scope.emailChangeSubmit = function () { 3426 if ($scope.accountCredentials.CurrentEmailAddress 3427 && $scope.accountCredentials.CurrentAccountPassword 3428 && $scope.accountCredentials.NewEmailAddress 3429 && $scope.accountCredentials.ConfirmNewEmailAddress 3430 ) { 3431 $scope.loading = true; 3432 return _authenticateService.AccountChangeEmail($scope.accountCredentials).then(function (response) { 3433 $scope.emailMsg = response.returnMessage; 3434 if (response.returnMessage === "Email address updated.") { 3435 $scope.emailError = false; 3436 $scope.accountCredentials = { 3437 CurrentEmailAddress: $scope.accountCredentials.NewEmailAddress 3438 } 3439 } else { 3440 $scope.emailError = true; 3441 if (response.returnMessage === "Unable to update email address.") { 3442 $scope.emailMsg = response.returnMessage + " Please double check your current password, then try again."; 3443 } 3444 } 3445 $scope.loading = false; 3446 }); 3447 } 3448 } 3449 3450 $scope.passwordChangeSubmit = function () { 3451 $scope.loading = true; 3452 if ($scope.accountCredentials.CurrentPassword 3453 && $scope.accountCredentials.NewPassword 3454 && $scope.accountCredentials.ConfirmNewPassword 3455 ) { 3456 return _authenticateService.AccountChangePassword($scope.accountCredentials).then(function (response) { 3457 $scope.passwordMsg = response.returnMessage; 3458 if (response.returnMessage === "Password updated") { 3459 $scope.passwordError = false; 3460 } else { 3461 $scope.passwordError = true; 3462 $scope.passwordMsg = response.returnMessage + " Please double check your current password, then try again."; 3463 } 3464 $scope.loading = false; 3465 }); 3466 } 3467 } 3468 3469 $scope.showPassword = function (btn, inpt) { 3470 if ($("#" + btn).hasClass("show")) { 3471 $("#" + btn).removeClass("show"); 3472 $("#" + btn).attr("aria-label", "Hide password"); 3473 $("#" + btn + " " + "img").attr('src', '/Images/PW_show.svg'); 3474 $('#' + inpt).attr("type", "password"); 3475 } else { 3476 $("#" + btn).addClass("show"); 3477 $("#" + btn).attr("aria-label", "Show password"); 3478 $("#" + btn + " " + "img").attr('src', '/Images/PW_hide.svg'); 3479 $("#" + inpt).attr("type", "text"); 3480 } 3481 } 3482} 3483 3484AccountCredentialsController.$inject = ['$scope', '_authenticateService', '$window'];; 3485var AccountGiftCardLookupController = function ($scope, $mdDialog, $window, $timeout, _accountService) { 3486 3487 var ctrl = this; 3488 3489 this.$onInit = function () { 3490 $scope.gcData = window.gcData; 3491 $scope.newCardNumber = null; 3492 $scope.newPinNumber = null; 3493 $scope.gcError = null; 3494 $scope.removeError = null; 3495 $scope.giftCardLookup = null; 3496 } 3497 3498 $scope.addAccountGiftCard = function () { 3499 if ($scope.newCardNumber == null || $scope.newCardNumber == undefined) return false; 3500 3501 return _accountService.saveNewGiftCard($scope.newCardNumber).then(function (response) { 3502 if (response != undefined) { 3503 if (response.errorMsg.length > 0) { 3504 $scope.gcError = response.errorMsg; 3505 $scope.newCardNumber = null; 3506 $scope.clearMessage(); 3507 } else { 3508 $scope.newCardNumber = null; 3509 $scope.gcData.SavedGiftCards = response.giftCard.SavedGiftCards; 3510 $scope.gcData.TotalGiftCardBalance = response.giftCard.TotalGiftCardBalance; 3511 } 3512 } else {
3513 $scope.gcError = "Sorry, an error has occurred. Please try again shortly."; 3514 $scope.clearMessage(); 3515 } 3516 }) 3517 } 3518 3519 $scope.removeAccountGiftCard = function (cardNumber) { 3520 if (!cardNumber) return false; 3521 return _accountService.removeGiftCard(cardNumber).then(function (response) { 3522 if (response != undefined) { 3523 if (response.errorMsg.length > 0) { 3524 $scope.removeError = response.errorMsg; 3525 $scope.clearMessage(); 3526 } else { 3527 $scope.gcData.SavedGiftCards = response.giftCard.SavedGiftCards; 3528 $scope.gcData.TotalGiftCardBalance = response.giftCard.TotalGiftCardBalance; 3529 } 3530 } else { 3531 $scope.removeError = "There was an error removing that gift card. Please try again later."; 3532 $scope.clearMessage(); 3533 } 3534 }) 3535 }; 3536 3537 $scope.searchGiftCard = function () { 3538 3539 if ($scope.giftCardLookup != null) { 3540 $scope.giftCardLookup = null; 3541 } 3542 3543 if ($scope.newCardNumber == null) { 3544 $scope.removeError = "Card number is required."; 3545 $scope.clearMessage(); 3546 return false; 3547 } else if ($scope.newPinNumber == null) { 3548 $scope.removeError = "A PIN or recipient last name is required."; 3549 $scope.clearMessage(); 3550 return false; 3551 } 3552 3553 return _accountService.searchEcomGiftCard($scope.newCardNumber, $scope.newPinNumber).then(function (response) { 3554 if (response) { 3555 if (response.errorMsg != undefined && response.errorMsg.length > 0) { 3556 $scope.removeError = response.errorMsg; 3557 } else if (response.giftCardList != undefined && response.giftCardList.GiftCardList.length) { 3558 if (response.giftCardList.GiftCardList[0].CardNumber != undefined) { 3559 $scope.giftCardLookup = response.giftCardList.GiftCardList[0]; 3560 } else { 3561 $scope.removeError = "We couldn't find that gift card. Please try again."; 3562 } 3563 } else { 3564 $scope.removeError = "We couldn't find that gift card. Please try again."; 3565 } 3566 } else { 3567 $scope.removeError = "There was an error lookup up that gift card. Please try again."; 3568 } 3569 $scope.clearMessage(); 3570 }) 3571 }; 3572 3573 $scope.clearMessage = function () { 3574 $timeout(function () { 3575 $scope.gcError = null; 3576 $scope.removeError = null; 3577 }, 5000); 3578 } 3579} 3580 3581AccountGiftCardLookupController.$inject = ['$scope', '$mdDialog', '$window', '$timeout', '_accountService'];; 3582var AccountOrderListController = function ($scope, _accountService) { 3583 3584 this.$onInit = function () { 3585 $scope.loading = true; 3586 $scope.vm = {}; 3587 $scope.vm.orders = []; 3588 $scope.vm.inProgressOrders = []; 3589 $scope.vm.previousOrders = []; 3590 $scope.vm.searchOrders = []; 3591 $scope.vm.showBackOrderMsg = false; 3592 $scope.vm.isSearching = false; 3593 $scope.vm.isTyping = false; 3594 $scope.vm.dateFilterDropDown = []; 3595 $scope.vm.dateFilter = ""; 3596 $scope.vm.searchTerm = ""; 3597 $scope.vm.ddFilterValue = "Last 3 months"; 3598 $scope.vm.searchKey = ""; 3599 $scope.vm.selectedStatus = "ALL"; 3600 $scope.OrderMessage = "Loading Orders"; 3601 $scope.vm.recallOrders = []; 3602 3603 $scope.getOrderListDetails(); 3604 } 3605 3606 $scope.onSearchInputChanged = function () { 3607 $scope.vm.isTyping = true; 3608 }; 3609 3610 $scope.getOrderListDetails = function () { 3611 $scope.loading = true; 3612 _accountService.getOrderListDetails().then(function (response) { 3613 if (response != undefined) { 3614 //build the year drop down from available years 3615 if (response.orderYears != undefined) { 3616 for (var i = 0; i < response.orderYears.length; i++) { 3617 $scope.vm.dateFilterDropDown.push(response.orderYears[i]); 3618 } 3619 } 3620 3621 //get orders and filter by 3 months 3622 $scope.vm.orders = response.orders; 3623 if ($scope.vm.orders) { 3624 $scope.splitOrdersToDisplay(""); 3625 } 3626 3627 $scope.vm.showBackOrderMsg = $scope.vm.inProgressOrders.filter(function (element) { return element.HasBackOrderItem == true }).length; 3628 $scope.OrderMessage = "You have not placed any orders in the last 3 months."; 3629 3630 $scope.vm.recallOrders = $scope.vm.orders.filter(function (order) { 3631 return order.OrderItems.some(function (item) { 3632 return item.IsRecalledItem == "Y"; 3633 }); 3634 }); 3635 } 3636 }); 3637 $scope.loading = false; 3638 } 3639 3640 $scope.submitSearch = function () { 3641 if ($scope.vm.searchKey == "" || $scope.vm.searchKey == undefined) { return false; } 3642 if (!$scope.vm.orders) { 3643 alert("No Orders to Search"); 3644 return false; 3645 } 3646 3647 $scope.loading = true; 3648 $scope.vm.isSearching = true; 3649 $scope.vm.searchOrders = []; 3650 $scope.vm.searchTerm = angular.copy($scope.vm.searchKey); 3651 3652 var matchingOrders = $scope.vm.orders.filter(function (order) { 3653 return (order.OrderNumberPrefix + order.OrderNumber + '') === ($scope.vm.searchKey + ''); 3654 }); 3655 3656 if (matchingOrders.length > 0) { 3657 $scope.vm.searchOrders = matchingOrders.map(function (order) { 3658 return angular.copy(order); 3659 }); 3660 } 3661 else { 3662 var onlyNum = /^\d+$/.test($scope.vm.searchKey); 3663 3664 $scope.vm.orders.filter(function (element) { 3665 //see if that item exists on the order 3666 var orderToCheck = angular.copy(element); 3667 var itemsToAdd = []; 3668 3669 element.OrderItems.filter(function (item) { 3670 3671 if (onlyNum) { //check item numbers if only numbers 3672 if ((item.ID + '').indexOf($scope.vm.searchKey) > -1) { 3673 itemsToAdd.push(item); 3674 } 3675 } 3676 else { //check item names 3677 if ((item.Name.toLowerCase()).indexOf($scope.vm.searchKey.toLowerCase()) > -1) { 3678 itemsToAdd.push(item); 3679 } 3680 } 3681 }); 3682 3683 //if an item exists, add that order and that item 3684 if (itemsToAdd.length > 0) { 3685 orderToCheck.TotalItems = orderToCheck.OrderItems !== undefined ? orderToCheck.OrderItems.length : itemsToAdd.length; 3686 orderToCheck.OrderItems = itemsToAdd; 3687 $scope.vm.searchOrders.push(orderToCheck); 3688 } 3689 }); 3690 } 3691 3692 $scope.vm.selectedStatus = "ALL"; 3693 $scope.loading = false; 3694 angular.element(document.querySelector('#search-button')).focus(); 3695 } 3696 3697 $scope.submitStatusSearch = function () { 3698 if ($scope.vm.selectedStatus == "") { return false; } 3699 if (!$scope.vm.orders) { 3700 alert("No Orders to Search"); 3701 return false; 3702 } 3703 3704 var selectedStatus = $scope.vm.selectedStatus.toUpperCase(); 3705 if (selectedStatus == "ALL") { 3706 $scope.clearSearch(); 3707 return true; 3708 } 3709 3710 //List of shipping status codes from ShippingStatuses.cs and what status they map to from the search buttons 3711 var statusCodeMap = { 3712 PROCESSING: ["BACKORDERED", "IN PROCESS", "SHIPPING FROM MANUFACTURER"], 3713 SHIPPED: ["SHIPPED", "AUTHORIZED FOR RETURN"], 3714 DELIVERED: ["DELIVERED"], 3715 RETURNED: ["RETURNED", "ITEM RETURNED", "RETURNED / EXCHANGED"] 3716 }; 3717 3718 var matchCodes = statusCodeMap[selectedStatus] || [selectedStatus]; 3719 $scope.loading = true; 3720 $scope.vm.isSearching = true; 3721 $scope.vm.isTyping = false; 3722 $scope.vm.searchKey = ""; 3723 $scope.vm.searchOrders = []; 3724 3725 //for each item in each order, retrieve the shipping status code
3726 $scope.vm.orders.forEach(function (order) { 3727 var orderToCheck = angular.copy(order); 3728 var orderItems = order.OrderItems || []; 3729 3730 var matchingItems = orderItems.filter(function (item) { 3731 var itemCode = (item.Status || "").toUpperCase(); 3732 return matchCodes.indexOf(itemCode) > -1; 3733 }); 3734 3735 if (matchingItems.length > 0) { //If any items match the selected status, add the order to the search results 3736 orderToCheck.TotalItems = orderItems.length; 3737 orderToCheck.OrderItems = matchingItems; 3738 $scope.vm.searchOrders.push(orderToCheck); 3739 } 3740 }); 3741 3742 $scope.loading = false; 3743 } 3744 3745 $scope.getOrderByOrderNumber = function (orderNumber) { 3746 $scope.loading = true; 3747 $scope.vm.isSearching = true; 3748 $scope.vm.searchOrders = []; 3749 3750 $scope.vm.recallOrders.filter(function (order) { 3751 var orderToCheck = angular.copy(order); 3752 3753 if ((order.OrderNumber) === orderNumber) { 3754 $scope.vm.searchOrders.push(orderToCheck); 3755 } 3756 }); 3757 $scope.loading = false; 3758 angular.element(document.querySelector('#search-button')).focus(); 3759 } 3760 3761 $scope.filterByDate = function () { 3762 if ($scope.vm.dateFilter == "") 3763 $scope.vm.ddFilterValue = "Last 3 months"; 3764 else 3765 $scope.vm.ddFilterValue = $scope.vm.dateFilter; 3766 3767 $scope.loading = true; 3768 $scope.splitOrdersToDisplay($scope.vm.dateFilter); 3769 } 3770 3771 $scope.splitOrdersToDisplay = function (splitType) { 3772 $scope.vm.inProgressOrders = []; 3773 $scope.vm.previousOrders = []; 3774 3775 if (splitType == "") { 3776 //split orders and show within the last three months 3777 $scope.vm.orders.filter(function (element) { 3778 var newdate = new Date(); 3779 newdate.setMonth(newdate.getMonth() - 3); 3780 if (element.OrderDate > newdate) { 3781 if (element.OrderStatus == "IN PROCESS" || element.CustStatus == "OIS") 3782 $scope.vm.inProgressOrders.push(element); 3783 else 3784 $scope.vm.previousOrders.push(element); 3785 } 3786 3787 }); 3788 3789 } 3790 else { 3791 //split orders and show the specific year 3792 $scope.vm.orders.filter(function (element) { 3793 var year = element.OrderDate.getYear(); 3794 if (year < 0) { year = 1900 - year; } 3795 else { year = year + 1900; } 3796 3797 if (year == splitType) { 3798 if (element.OrderStatus == "IN PROCESS" || element.CustStatus == "OIS") 3799 $scope.vm.inProgressOrders.push(element); 3800 else 3801 $scope.vm.previousOrders.push(element); 3802 } 3803 }); 3804 } 3805 $scope.loading = false; 3806 } 3807 3808 $scope.clearSearch = function () { 3809 angular.element(document.querySelector('#search-orders')).focus(); 3810 $scope.vm.isSearching = false; 3811 $scope.vm.searchTerm = ""; 3812 $scope.vm.searchOrders = []; 3813 $scope.loading = false; 3814 $scope.vm.searchKey = ""; 3815 } 3816} 3817 3818AccountOrderListController.$inject = ['$scope', '_accountService'];; 3819var AccountRewardsCertController = function($scope, $window, _accountService) { 3820 3821 var certCtrl = this; 3822 3823 this.$onInit = function () { 3824 $scope.certInput = ""; 3825 $scope.certLookup = {}; 3826 $scope.loading = false; 3827 $scope.message = ""; 3828 $scope.rewardsData = $window.initData; 3829 } 3830 3831 $scope.lookupCert = function () { 3832 certCtrl.certForm.$setSubmitted(); 3833 if (!certCtrl.certForm.$valid) { 3834 $scope.showFormErrors(); 3835 return false; 3836 } 3837 3838 _accountService.guideRewardsCertAction($scope.certInput, "BALANCE").then(function (response) { 3839 if (response.EnteredGuideRewards.RewardCertBalance == null) { 3840 $scope.rewardsData.EnteredGuideRewards = {}; 3841 $scope.message = "Guide Reward Certificate Not Found"; 3842 } else { 3843 $scope.message = ""; 3844 $scope.rewardsData = response; 3845 } 3846 }); 3847 } 3848 3849 $scope.addCert = function(certId) { 3850 _accountService.guideRewardsCertAction(certId, "ADD").then(function (response) { 3851 $scope.rewardsData.GuideRewardsCertList.push($scope.rewardsData.EnteredGuideRewards);
3852 $scope.rewardsData.EnteredGuideRewards = {}; 3853 $scope.message = ""; 3854 }); 3855 } 3856 3857 $scope.removeCert = function (cert) { 3858 _accountService.guideRewardsCertAction(cert.RewardCertNumber, "REMOVE").then(function (response) { 3859 $scope.message = ""; 3860 var index = $scope.rewardsData.GuideRewardsCertList.indexOf(cert); 3861 $scope.rewardsData.GuideRewardsCertList.splice(index, 1); 3862 }); 3863 } 3864 3865 $scope.showFormErrors = function () { 3866 var errEl = angular.element('input.ng-invalid').first(); 3867 if (errEl) { 3868 errEl.focus(); 3869 if (errEl[0]) { 3870 window.scrollTo(0, errEl[0].documentOffsetTop() - (window.innerHeight / 2)); 3871 } 3872 } 3873 3874 angular.forEach(certCtrl.certForm.$error, function (field) { 3875 angular.forEach(field, function (errorField) { 3876 errorField.$setTouched(); 3877 }); 3878 }); 3879 } 3880} 3881 3882AccountRewardsCertController.$inject = ['$scope', '$window', '_accountService'];; 3883var AddressBookController = function ($scope, $mdDialog, _addressService) { 3884 3885 var ctrl = this; 3886 3887 //check if default addresses are the same for billing and shipping 3888 var updateSharedDefaultAddress = function () { 3889 $scope.sharedDefaultAddress = $scope.checkSharedDefaultAddress(); 3890 }; 3891 3892 //get the current default shipping address 3893 var getDefaultShippingAddress = function () { 3894 if (!$scope.vm || !$scope.vm.ShippingAddresses) return null; 3895 3896 return $scope.vm.ShippingAddresses.find(function (addr) { 3897 return addr && addr.IsDefault; 3898 }) || null; 3899 }; 3900 3901 this.$onInit = function () { 3902 $scope.selectDays = []; 3903 $scope.selectYears = []; 3904 $scope.syncBillingToDefaultShippingOnSave = false; 3905 3906 for (var i = 0; i <= 110; i++) { $scope.selectYears.push(moment().year() - i); } 3907 3908 return _addressService.getAccountAddressBook().then(function (addressBook) { 3909 $scope.vm = addressBook; 3910 updateSharedDefaultAddress(); 3911 }); 3912 } 3913 3914 $scope.getCountriesStates = function () { 3915 return _addressService.getCountryDropDownList().then(function (countryList) { 3916 if (countryList != undefined) { 3917 $scope.countryList = countryList; 3918 if (!$scope.address.Country) $scope.Country = "US"; 3919 3920 return _addressService.getStateDropDownList($scope.address.Country).then(function (stateList) { 3921 $scope.stateList = stateList; 3922 }); 3923 } 3924 }); 3925 } 3926 3927 $scope.countryChange = function () { 3928 $scope.address.State = undefined; 3929 3930 return _addressService.getStateDropDownList($scope.address.Country).then(function (stateList) { 3931 $scope.stateList = stateList; 3932 }); 3933 } 3934 3935 $scope.stateValidate = function () { 3936 if (ctrl.aForm.state != undefined) { 3937 if (isNullOrWhiteSpace($scope.address.State)) { 3938 ctrl.aForm.state.$setValidity("required", false); 3939 return false; 3940 } 3941 ctrl.aForm.state.$setValidity("required", true); 3942 return true; 3943 } 3944 } 3945 3946 $scope.addAddress = function () { 3947 $scope.vm.errorMessage = undefined; 3948 if ($scope.vm.ShippingAddresses.length > 24) { 3949 $scope.vm.errorMessage = "Your address book is full! Please remove a previous entry and try again."; 3950 return false; 3951 } 3952 3953 var maxAddressNumber = $scope.vm.ShippingAddresses.length 3954 ? Math.max.apply(Math, $scope.vm.ShippingAddresses.map(function(addr) { return addr.AddressNumber; })) 3955 : 0; 3956 3957 var address = { 3958 AddressType: 1, 3959 AddressNumber: maxAddressNumber + 1, 3960 Country: "US" 3961 }; 3962 3963 return $scope.editAddress(address); 3964 } 3965 3966 $scope.removeAddress = function(address) { 3967 var id = address.CtAddressId; 3968 3969 return _addressService.removeAddress(id).then(function(response) { 3970 if (response.success) { 3971 var index = $scope.vm.ShippingAddresses.findIndex(function(addr) { 3972 return addr.CtAddressId === id; 3973 }); 3974 if (index > -1) $scope.vm.ShippingAddresses.splice(index, 1); 3975 if (response.defaultId) {
3976 $scope.vm.ShippingAddresses.forEach(function (addr) { 3977 addr.IsDefault = addr.AddressNumber === response.defaultId ? true : false; 3978 }); 3979 } 3980 3981 updateSharedDefaultAddress(); 3982 } 3983 }); 3984 } 3985 3986 //check if the default billing address is the same as the provided shipping address 3987 $scope.checkSharedDefaultAddress = function (shippingAddress) { 3988 var vm = $scope.vm; 3989 if (!vm) return false; 3990 3991 var billingAddress = vm.BillingAddress; 3992 var shippingAddresses = vm.ShippingAddresses; 3993 3994 if (!billingAddress || !shippingAddresses || !shippingAddresses.length) return false; 3995 3996 var defaultShipping; 3997 3998 if (shippingAddress) { 3999 if (!shippingAddress.IsDefault) return false; 4000 defaultShipping = shippingAddress; 4001 } else { 4002 defaultShipping = shippingAddresses.find(function (addr) { 4003 return addr && addr.IsDefault; 4004 }); 4005 } 4006 4007 if (!defaultShipping) return false; 4008 4009 var checkNull = function (value) { 4010 return isNullOrWhiteSpace(value) ? "" : value.toString().trim().toLowerCase(); 4011 }; 4012 4013 return checkNull(billingAddress.Address1) === checkNull(defaultShipping.Address1) && 4014 checkNull(billingAddress.City) === checkNull(defaultShipping.City) && 4015 checkNull(billingAddress.State) === checkNull(defaultShipping.State) && 4016 checkNull(billingAddress.Zip) === checkNull(defaultShipping.Zip) && 4017 checkNull(billingAddress.Country) === checkNull(defaultShipping.Country); 4018 4019 } 4020 4021 //set as default shipping address 4022 $scope.setAsDefault = function (address) { 4023 var selectedAddress = address || $scope.address; 4024 if (!selectedAddress) return false; 4025 4026 var id = selectedAddress.CtAddressId; 4027 4028 $scope.inlineLoading = true; 4029 $scope.vm.errorMessage = undefined; 4030 4031 return _addressService.setAccountAddressDefault(id).then(function (success) { 4032 $scope.inlineLoading = false; 4033 4034 if (!success) { 4035 $scope.vm.errorMessage = "Unable to set default shipping address."; 4036 return false; 4037 } 4038 4039 $scope.vm.ShippingAddresses.forEach(function (addr) { 4040 addr.IsDefault = addr.CtAddressId === id; 4041 }); 4042 4043 updateSharedDefaultAddress(); 4044 $scope.closeDialog(); 4045 return true; 4046 }); 4047 } 4048 4049 //set as default billing address 4050 $scope.setAsBilling = function (address) { 4051 var selectedAddress = address || $scope.address; 4052 if (!selectedAddress) return false; 4053 4054 var id = $scope.vm.BillingAddress.CtAddressId; 4055 4056 $scope.inlineLoading = true; 4057 $scope.vm.errorMessage = undefined; 4058 4059 var billingAddress = angular.copy(selectedAddress); 4060 billingAddress.AddressType = 0; 4061 billingAddress.CtAddressKey = 'billingAddress'; 4062 billingAddress.CtAddressId = id; 4063 billingAddress.IsDefault = true; 4064 4065 return _addressService.saveAnyAddress(billingAddress).then(function (response) { 4066 $scope.inlineLoading = false; 4067 4068 if (!response.success) { 4069 $scope.vm.errorMessage = "Unable to set default billing address."; 4070 return false; 4071 } 4072 4073 $scope.vm.BillingAddress = billingAddress; 4074 updateSharedDefaultAddress(); 4075 $scope.closeDialog(); 4076 return true; 4077 }); 4078 } 4079 4080 //set as default billing & shipping address 4081 $scope.setAsDefaultForBoth = function (address) { 4082 var selectedAddress = address || $scope.address; 4083 if (!selectedAddress) return false; 4084 4085 $scope.inlineLoading = true; 4086 $scope.vm.errorMessage = undefined; 4087 4088 var id = selectedAddress.CtAddressId; 4089 var billingAddress = angular.copy(selectedAddress); 4090 billingAddress.AddressType = 0; 4091 billingAddress.CtAddressId = $scope.vm.BillingAddress.CtAddressId; 4092 billingAddress.IsDefault = true; 4093 4094 return _addressService.setAccountAddressDefault(id) 4095 .then(function (success) { 4096 if (!success) { 4097 $scope.inlineLoading = false; 4098 $scope.vm.errorMessage = "Unable to set default shipping address."; 4099 return false; 4100 } 4101
4102 $scope.vm.ShippingAddresses.forEach(function (addr) { 4103 addr.IsDefault = addr.CtAddressId === id; 4104 }); 4105 4106 return _addressService.saveAnyAddress(billingAddress).then(function (response) { 4107 $scope.inlineLoading = false; 4108 4109 if (!response.success) { 4110 $scope.vm.errorMessage = "Unable to set default billing address."; 4111 return false; 4112 } 4113 4114 $scope.vm.BillingAddress = billingAddress; 4115 updateSharedDefaultAddress(); 4116 $scope.closeDialog(); 4117 return true; 4118 }); 4119 }); 4120 } 4121 4122 $scope.setAsDefaultModal = function (address) { 4123 if (address != null) { 4124 $scope.address = angular.copy(address); 4125 } 4126 else { 4127 $scope.address = { AddressType: 0, Country: "US" }; 4128 } 4129 4130 if ($scope.countryList == undefined) $
4130scope.getCountriesStates(); 4131 4132 $scope.modal = { 4133 customCssClass: "address-edit-modal" + " address-default-change-modal", 4134 title: "Change Default Address", 4135 templateUrl: "/templates/shared/address-set-default.html" 4136 } 4137 4138 return $mdDialog.show($mdDialog.modal({ scope: $scope })); 4139 } 4140 4141 $scope.editAddress = function (address) { 4142 if (address != null) { 4143 $scope.address = angular.copy(address); 4144 } 4145 else { 4146 $scope.address = { AddressType: 0, Country: "US" }; 4147 } 4148 4149 if ($scope.countryList == undefined) $scope.getCountriesStates(); 4150 4151 $scope.modal = { 4152 customCssClass: "address-edit-modal", 4153 title: (!$scope.address.LastName ? "Add " : "Edit ") + 4154 ($scope.address.AddressType === 0 ? "Billing " : "Shipping ") + "Address", 4155 templateUrl: "/templates/shared/address-edit.html" 4156 } 4157 4158 return $mdDialog.show($mdDialog.modal({ scope: $scope })); 4159 } 4160 4161 //save address (billing or shipping or both if billing is synced to default shipping) and update the address book view model 4162 $scope.saveAddress = function () { 4163 ctrl.aForm.$setSubmitted(); 4164 if (!ctrl.aForm.$valid) { 4165 $scope.showFormErrors(); 4166 return false; 4167 } 4168 4169 $scope.inlineLoading = true; 4170 $scope.vm.errorMessage = undefined; 4171 4172 return _addressService.saveAnyAddress($scope.address).then(function (response) { 4173 if (!response.success) { 4174 $scope.address.errorMessage = response.error; 4175 return false; 4176 } 4177 4178 if ($scope.address.AddressType === 1) { //shipping 4179 if ($scope.address.IsDefault) { 4180 $scope.vm.ShippingAddresses.forEach(function (addr) { addr.IsDefault = false; }); 4181 } 4182 4183 var index = $scope.vm.ShippingAddresses.findIndex(function (addr) { 4184 return addr.AddressNumber === $scope.address.AddressNumber; 4185 }); 4186 if (index > -1) { 4187 $scope.vm.ShippingAddresses[index] = $scope.address; 4188 } else { 4189 $scope.vm.ShippingAddresses.push($scope.address); 4190 } 4191 4192 return true; 4193 } 4194 4195 if ($scope.address.AddressType === 0) //billing 4196 { 4197 $scope.vm.BillingAddress = $scope.address; 4198 4199 if ($scope.syncBillingToDefaultShippingOnSave) { 4200 var defaultShipping = getDefaultShippingAddress(); 4201 4202 if (defaultShipping) { 4203 var shippingAddress = angular.copy(defaultShipping); 4204 4205 shippingAddress.Description = $scope.address.Description; 4206 shippingAddress.FirstName = $scope.address.FirstName; 4207 shippingAddress.LastName = $scope.address.LastName; 4208 shippingAddress.Company = $scope.address.Company; 4209 shippingAddress.Address1 = $scope.address.Address1; 4210 shippingAddress.Address2 = $scope.address.Address2; 4211 shippingAddress.City = $scope.address.City; 4212 shippingAddress.State = $scope.address.State; 4213 shippingAddress.Zip = $scope.address.Zip; 4214 shippingAddress.Country = $scope.address.Country; 4215 shippingAddress.DayPhone = $scope.address.DayPhone; 4216 shippingAddress.AddressType = 1; 4217 shippingAddress.IsDefault = true; 4218 4219 return _addressService.saveAnyAddress(shippingAddress).then(function (shippingResponse) { 4220 if (!shippingResponse.success) { 4221 $scope.inlineLoading = false; 4222 $scope.address.errorMessage = shippingResponse.error || "Billing address saved, but unable to update default shipping address."; 4223 return false; 4224 } 4225 4226 var shipIndex = $scope.vm.ShippingAddresses.findIndex(function (addr) { 4227 return addr.CtAddressId === shippingAddress.CtAddressId; 4228 }); 4229 4230 if (shipIndex > -1) { 4231 $scope.vm.ShippingAddresses[shipIndex] = shippingAddress; 4232 } 4233 4234 return true; 4235 }); 4236 } 4237 } 4238 4239 return true; 4240 } 4241 4242 return true; 4243 }).then(function (success) { 4244 $scope.inlineLoading = false; 4245 4246 if (!success) return false; 4247 4248 updateSharedDefaultAddress(); 4249 $scope.closeDialog(); 4250 $scope.address = undefined; 4251 return true; 4252 }); 4253 } 4254 4255 $scope.closeDialog = function () { 4256 $mdDialog.hide(); 4257 $scope.modal = undefined; 4258 $scope.syncBillingToDefaultShippingOnSave = false; 4259 } 4260 4261 $scope.showFormErrors = function () { 4262 var errEl = angular.element('input.ng-invalid, md-checkbox.ng-invalid, md-select.ng-invalid, md-radio-group.ng-invalid').first(); 4263 if (errEl) { 4264 errEl.focus(); 4265 if (errEl[0]) { 4266 window.scrollTo(0, errEl[0].documentOffsetTop() - (window.innerHeight / 2)); 4267 } 4268 } 4269 4270 angular.forEach(ctrl.aForm.$error, function (field) { 4271 angular.forEach(field, function (errorField) { 4272 errorField.$setTouched(); 4273 }); 4274 }); 4275 } 4276} 4277 4278AddressBookController.$inject = ['$scope', '$mdDialog', '_addressService'];; 4279var EmailPreferencesController = function ($scope, $mdDialog, $window, $timeout, _accountService) { 4280 4281 var ctrl = this; 4282 4283 this.$onInit = function () { 4284 $scope.prefs = window.emailPreferences; 4285 $scope.prefsError = null; 4286 $scope.phoneError = null; 4287 $scope.initialSubscribe = $scope.prefs.DealsFlag; 4288 $scope.search = {}; 4289 $scope.search.email = undefined; 4290 $scope.signedoutError = null; 4291 } 4292
4293 $scope.savePreferences = function () { 4294 var opt = $scope.prefs.IsSMSOptIn; 4295 return _accountService.savePreferences($scope.prefs).then(function (response) { 4296 if (response != undefined) { 4297 $scope.prefs = response.emailPreferences; 4298 $scope.prefs.IsSMSOptIn = opt; 4299 $scope.initialSubscribe = $scope.prefs.DealsFlag; 4300 } else { 4301 $scope.prefsError = "Sorry, our email Preference Center is temporarily unavailable. Please try again later."; 4302 $scope.clearMessage(); 4303 } 4304 }) 4305 } 4306 4307 $scope.updateSMSOptions = function () { 4308 4309 if ($scope.prefs.IsSMSOptIn === false) { 4310 $scope.newPhone = null; 4311 return false; 4312 } 4313 4314 if ($scope.prefs.IsSMSOptIn && !$scope.newPhone) { 4315 ctrl.pForm.newPhone.$setValidity("invalid", false); 4316 $scope.showFormErrors(ctrl.pForm); 4317 return false; 4318 } 4319 4320 return _accountService.updateSMSOptions($scope.newPhone, $scope.prefs.EmailAddress).then(function (response) { 4321 if (response != undefined) { 4322 if (response.ReturnMessage?.length > 0) { 4323 $scope.phoneError = response.ReturnMessage; 4324 } else { 4325 $scope.prefs.PhoneNumber = $scope.newPhone; 4326 $scope.newPhone = null; 4327 $scope.phoneError = "Phone Number Updated Successfully."; 4328 } 4329 } else { 4330 $scope.phoneError = "Sorry, an error has occurred. Please try again shortly." 4331 } 4332 $scope.clearMessage(); 4333 }) 4334 } 4335 4336 $scope.signedOutSubscribes = function () { 4337 var email = $scope.emailResponse; 4338 if (!email) { 4339 return false; 4340 } else { 4341 //'account', 'subscribejson' 4342 return _accountService.signedOutSubscribe(email).then(function (response) { 4343 if (response != null) { 4344 if (response.success = true) { 4345 $scope.signedoutError = "Thanks for subscribing!"; 4346 $scope.search.preferences.DealsFlag = true; 4347 $scope.clearMessage(); 4348 } else { 4349 if (response.EmailAddressInvalidMessage != undefined) { 4350 $scope.signedoutError = response.EmailAddressInvalidMessage; 4351 } else { 4352 $scope.signedoutError = "There was an error with our subscription service. Please try again later."; 4353 } 4354 } 4355 } else { 4356 $scope.signedoutError = "There was an error with our subscription service. Please try again later."; 4357 } 4358 $scope.clearMessage(); 4359 }) 4360 } 4361 } 4362 4363 $scope.signedOutUnsubscribe = function () { 4364 var email = $scope.emailResponse; 4365 if (!email) { 4366 return false; 4367 } else { 4368 return _accountService.signedOutUnSubscribe(email).then(function (response) { 4369 if (response != null) { 4370 if (response.success == true) { 4371 $scope.signedoutError = "You have been unsubscribed."; 4372 $scope.search.preferences.DealsFlag = false; 4373 } else { 4374 if (response.EmailAddressInvalidMessage != undefined) { 4375 $scope.signedoutError = response.EmailAddressInvalidMessage; 4376 } else { 4377 $scope.signedoutError = "There was an error handling your request. Please try again later."; 4378 } 4379 } 4380 } else { 4381 $scope.signedoutError = "There was an error handling your request. Please try again later."; 4382 } 4383 $scope.clearMessage(); 4384 }) 4385 } 4386 } 4387 4388 $scope.searchEmail = function () { 4389 var email = $scope.search.email; 4390 if (!email) { 4391 return false; 4392 } else { 4393 return _accountService.searchSubscribeEmail(email).then(function (response) { 4394 if (response != null && response.preferences != null) { 4395 $scope.search.preferences = response.preferences; 4396 $scope.emailResponse = $scope.search.preferences.EmailAddress; 4397 $scope.search.email = null; 4398 } else { 4399 $scope.signedoutError = ""; 4400 } 4401 4402 $scope.clearMessage(); 4403 }) 4404 } 4405 } 4406 4407 $scope.clearMessage = function () { 4408 $timeout(function () { 4409 $scope.prefsError = null; 4410 $scope.phoneError = null; 4411 $scope.signedoutError = null; 4412 }, 5000); 4413 } 4414 4415 $scope.showFormErrors = function (form) { 4416 angular.forEach(form.$error, function (field) { 4417 angular.forEach(field, function (errorField) { 4418 errorField.$setTouched(); 4419 }); 4420 }); 4421 } 4422} 4423 4424EmailPreferencesController.$inject = ['$scope', '$mdDialog', '$window', '$timeout', '_accountService'];; 4425var LoyaltyTransactionsController = function ($scope, $mdDialog, _accountService) { 4426 4427 $scope.getDetails = function () { 4428 return _accountService.getLoyaltyTransactions().then(function(loyaltyTransactions) { 4429 $scope.loyaltyTransactions = loyaltyTransactions; 4430 4431 if ($scope.loyaltyTransactions && $scope.loyaltyTransactions.Transactions != null && 4432 $scope.loyaltyTransactions.Transactions.length > 0) { 4433 $scope.loyaltyTransactions.Transactions.forEach(function(trans) { 4434 trans.TransDate = new moment(trans.TransDate).format("MM/DD/YYYY"); 4435 }); 4436 } 4437 4438 $scope.modal = { 4439 customCssClass: 'loyalty-transactions-modal', 4440 title: 'Rewards Points Transactions', 4441 templateUrl: "/templates/shared/loyalty-transactions-modal.html" 4442 } 4443 4444 $mdDialog.show($mdDialog.modal({ scope: $scope })); 4445 }); 4446 } 4447 4448 $scope.closeDialog = function () { 4449 $mdDialog.hide(); 4450 $scope.modal = undefined; 4451 } 4452 4453} 4454 4455 4456LoyaltyTransactionsController.$inject = ['$scope', '$mdDialog', '_accountService'];; 4457var MyAccountClubBucksDialogController = function ($scope, $mdDialog, _accountService) { 4458 4459 $scope.showDialog = function (bucks) { 4460 $scope.clubBucks = JSON.parse(bucks); 4461 $scope.clubBucks.RedemptionEndDate = new Date(parseInt($scope.clubBucks.RedemptionEndDate.replace(/\/Date\((.*?)\)\//gi, "$1"))); 4462 $scope.clubBucks.RedemptionStartDate = new Date(parseInt($scope.clubBucks.RedemptionStartDate.replace(/\/Date\((.*?)\)\//gi, "$1"))); 4463 $scope.clubBucksOrders = []; 4464 $scope.clubBucksRedemptions = []; 4465 4466 _accountService.getClubBucksOrders($scope.clubBucks.Id).then(function (data) { 4467 $scope.clubBucksOrders = data.orders; 4468 }); 4469 4470 if ($scope.clubBucks.Id && $scope.clubBucks.GiftCardId) { 4471 _accountService.getClubBucksRedemptions($scope.clubBucks.Id, $scope.clubBucks.GiftCardId).then(function (data) { 4472 $scope.clubBucksRedemptions = data.redemptions; 4473 $scope.clubBucks.AmountRemaining = $scope.clubBucks.AmountEarned; 4474 if ($scope.clubBucksRedemptions) { 4475 for (var i = 0; i < $scope.clubBucksRedemptions.length; i++) { 4476 $scope.clubBucks.AmountRemaining -= parseFloat($scope.clubBucksRedemptions[i].GcAmtUsed); 4477 } 4478 } 4479 }); 4480 } 4481 4482 $scope.modal = { 4483 customCssClass: 'club-bucks-modal', 4484 title: 'Club Bucks', 4485 templateUrl: "/templates/shared/club-bucks-dialog.html" 4486 } 4487 4488 $mdDialog.show($mdDialog.modal({ scope: $scope })); 4489 } 4490 4491 $scope.closeDialog = function () { 4492 $mdDialog.hide(); 4493 $scope.id = undefined; 4494 $scope.clubBucksOrders = []; 4495 $scope.clubBucksRedemptions = []; 4496 $scope.modal = undefined; 4497 $scope.clubBucks = {}; 4498 } 4499 4500} 4501 4502 4503MyAccountClubBucksDialogController.$inject = ['$scope', '$mdDialog', '_accountService'];; 4504var MyTransactionsController = function ($scope, _accountService) { 4505 4506 this.$onInit = function () { 4507 $scope.vm = {}; 4508 getTransactions(); 4509 } 4510 4511 function getTransactions() { 4512 return _accountService.getTransactionsCustNum().then(function (response) { 4513 $scope.vm = response.model; 4514 cleanData(); 4515 }); 4516 } 4517 4518 function cleanData() { 4519 angular.forEach($scope.vm.Summary, function (value) { 4520 value.OrderNumber = value.OrderNumber.split("-", 1)[0]; 4521 }); 4522 } 4523} 4524 4525MyTransactionsController.$inject = ['$scope', '_accountService'];; 4526var MyWalletController = function ($scope, $window, $mdDialog, _accountService, _logService, _configService, $timeout) { 4527 4528 var ctrl = this; 4529 4530 this.$onInit = function () { 4531 $scope.cardholderName = ""; 4532 $scope.cardNumberElement = undefined; 4533 $scope.cardExpirationDateElement = undefined; 4534 $scope.cardVerificationCodeElement = undefined; 4535 $scope.psCardError = false; 4536 $scope.psApplyCardError = false; 4537 $scope.psTooMany = false; 4538 4539 $scope.getPublicSquareConfig(); 4540 4541 $scope.vm = {}; 4542 $scope.toggleInlineLoading(true); 4543 return _accountService.getStoredPaymentMethods().then(function (data) { 4544 $scope.toggleInlineLoading(false); 4545 $scope.vm = data.vm; 4546 }); 4547 } 4548 4549 $scope.getPublicSquareConfig = function () { 4550 if (window.PublicSquareConfig === undefined) 4551 return; 4552 4553 return _configService.getPublicSquareConfig(window.PublicSquareConfig.timeStamp).then( 4554 function (data) { 4555 window.PublicSquareConfig.publishableKey = data.key;
4556 initPublicSquare(); 4557 } 4558 ); 4559 } 4560 4561 $scope.publicSquareCreditCardInit = function () { 4562 try { 4563 $scope.cardholderName = ""; 4564 4565 $scope.unmountPublicSquareCreditCard(); 4566 4567 $scope.cardNumberElement = window.publicsquare.createCardNumberElement({ placeholder: "Card number", iconPosition: "right" }); 4568 $scope.cardNumberElement.mount('#ps-cardNumber'); 4569 4570 $scope.cardExpirationDateElement = window.publicsquare.createCardExpirationDateElement({ placeholder: "Expiration MM/YY" }); 4571 $scope.cardExpirationDateElement.mount('#ps-cardExpirationDate'); 4572 4573 $scope.cardVerificationCodeElement = window.publicsquare.createCardVerificationCodeElement({ placeholder: "Security code" }); 4574 $scope.cardVerificationCodeElement.mount('#ps-cardVerificationCode'); 4575 4576 $scope.psCard = undefined; 4577 $scope.psCardError = false; 4578 $scope.psApplyCardError = false; 4579 $scope.psTooMany = false; 4580 } 4581 catch (error) { 4582 console.error(error); 4583 var logError = { 4584 Message: "Public Square Credit Card Init Failed", 4585 Error: error, 4586 FileName: "angular.tsgMvc.js.publicSquareCreditCardInit" //server side strips the extension... lets keep it here 4587 }; 4588 _logService.error(logError); 4589 } 4590 } 4591 4592 $scope.unmountPublicSquareCreditCard = function () { 4593 try { 4594 $scope.cardNumberElement?.unmount() 4595 } catch { } 4596 4597 try { 4598 $scope.cardExpirationDateElement?.unmount() 4599 } catch { } 4600 4601 try { 4602 $scope.cardVerificationCodeElement?.unmount() 4603 } catch { } 4604 } 4605 4606 $scope.submitPSCard = function () { 4607 try { 4608 $scope.cardholderName = $("#cardholderName").val(); 4609 4610 if ($scope.cardholderName === undefined || $scope.cardholderName.trim() === "") { 4611 $scope.psApplyCardError = true; 4612 $scope.psApplyCardErrorMsg = "Cardholder Name is required"; 4613 } 4614 else if (!$scope.cardNumberElement.metadata.valid) { 4615 $scope.psApplyCardError = true; 4616 $scope.psApplyCardErrorMsg = "Card Number is required"; 4617 } 4618 else if (!$scope.cardExpirationDateElement.metadata.valid) { 4619 $scope.psApplyCardError = true; 4620 $scope.psApplyCardErrorMsg = "Expiration Date is required"; 4621 } 4622 else if (!$scope.cardVerificationCodeElement.metadata.valid) { 4623 $scope.psApplyCardError = true; 4624 $scope.psApplyCardErrorMsg = "Security Code is required"; 4625 } 4626 else { 4627 $scope.psApplyCardError = false; 4628 $scope.psApplyCardErrorMsg = undefined; 4629 $scope.toggleInlineLoading(true); 4630 4631 return window.publicsquare.cards.create({ 4632 cardholder_name: $scope.cardholderName.trim(), 4633 card: { 4634 number: $scope.cardNumberElement, 4635 expirationMonth: $scope.cardExpirationDateElement.month(), 4636 expirationYear: $scope.cardExpirationDateElement.year(), 4637 cvc: $scope.cardVerificationCodeElement, 4638 } 4639 }).then(function (card) { 4640 return _accountService.saveCard(card.id, false).then(function (success) { 4641 if (success) { 4642 $scope.closeDialog(); 4643 return _accountService.getStoredPaymentMethods().then(function (data) { 4644 $scope.toggleInlineLoading(false); 4645 $scope.vm = data.vm; 4646 }); 4647 } 4648 else { 4649 $scope.toggleInlineLoading(false); 4650 $scope.psApplyCardError = true; 4651 $scope.psApplyCardErrorMsg = "Unable to save card"; 4652 } 4653 }); 4654 }); 4655 } 4656 } catch (error) { 4657 $scope.toggleInlineLoading(false); 4658 $scope.psApplyCardError = true; 4659 $scope.psApplyCardErrorMsg = error; 4660 console.error(error); 4661 } 4662 } 4663 4664 $scope.addPaymentMethod = function () { 4665 4666 $scope.modal = { 4667 title: "Add New Credit Card", 4668 customCssClass: "save-card-modal", 4669 templateUrl: "/templates/account/save-card-modal.html" 4670 } 4671 4672 $mdDialog.show($mdDialog.modal({ scope: $scope })); 4673 $timeout(function () { 4674 $scope.publicSquareCreditCardInit(); 4675 }, 500); 4676 } 4677 4678 $scope.deletePaymentMethod = function (pymtMethod) { 4679 $scope.toggleInlineLoading(true); 4680 return _accountService.deleteCreditCard(pymtMethod.CtCardId).then(function (data) { 4681 if (data.success) { 4682 return _accountService.getStoredPaymentMethods().then(function (data) { 4683 $scope.toggleInlineLoading(false); 4684 $scope.vm = data.vm; 4685 }); 4686 } 4687 else { 4688 $scope.toggleInlineLoading(false); 4689 } 4690 }); 4691 } 4692 4693 $scope.setDefaultPaymentMethod = function (pymtMethod) { 4694 $scope.toggleInlineLoading(true);
4695 return _accountService.setDefaultCreditCard(pymtMethod.CtCardId).then(function (data) { 4696 if (data.success) { 4697 return _accountService.getStoredPaymentMethods().then(function (data) { 4698 $scope.toggleInlineLoading(false); 4699 $scope.vm = data.vm; 4700 }); 4701 } 4702 else { 4703 $scope.toggleInlineLoading(false); 4704 } 4705 }); 4706 } 4707 4708 $scope.closeDialog = function () { 4709 $mdDialog.hide(); 4710 $scope.modal = undefined; 4711 if ($window.dropInUI) $window.dropInUI.unmount(); 4712 } 4713 4714 $scope.toggleInlineLoading = function (loading) { 4715 if (loading) 4716 $('.loading').show(); 4717 else 4718 $('.loading').hide(); 4719 } 4720} 4721 4722MyWalletController.$inject = ['$scope', '$window', '$mdDialog', '_accountService', '_logService', '_configService', '$timeout'];; 4723//data.BMSM 4724var BuyMoreSaveMoreController = function ($scope) { 4725 this.$onInit = function () { 4726 $scope.allBMSM = []; 4727 $scope.pricePerRoundDiscount = []; 4728 $scope.selectedProduct.BMSM = undefined; 4729 $scope.createBMSMDropdown(); 4730 } 4731 4732 $scope.createBMSMDropdown = function () { 4733 $scope.data.BMSM.forEach(function (discount, index) { 4734 //if (discount.MaxQuantity == 0) { 4735 // $scope.allBMSM.push({ discountMin: discount.MinQuantity, discountPercent: discount.AmountOff, discountMax: "or more" }) 4736 //} else { 4737 $scope.isAmmo = discount.IsAmmo; 4738 $scope.allBMSM.push({ discountMin: discount.MinQuantity, roundsDiscount: discount.RoundsSavings, discountPercent: discount.AmountOff, amountOffType: discount.AmountOffType, discountMax: "or more", PPRSavings: $scope.data.BuyMoreSaveMoreDropDown[index] }) 4739 //} 4740 }) 4741 } 4742 4743 $scope.$watch("selectedProduct.BMSM", function (newVal, oldVal) { 4744 if (newVal != undefined && oldVal != newVal) { 4745 $scope.selectedProduct.BMSMQuantity = newVal; 4746 } else if (newVal == undefined) { 4747 $scope.selectedProduct.BMSMQuantity = undefined; 4748 } 4749 }); 4750 4751} 4752 4753BuyMoreSaveMoreController.$inject = ['$scope'];; 4754var CompanionProductsController = function ($scope, $window, $timeout, _productService) { 4755 4756 var compCtrl = this; 4757 4758 var $form; 4759 4760 this.$onInit = function () { 4761 $scope.vm = $scope.data.CompanionProducts; 4762 $scope.parentSizeCode = undefined; 4763 $scope.parentColorCode = undefined; 4764 $scope.parentWaistCode = undefined; 4765 $scope.parentInseamCode = undefined; 4766 $scope.parentGolfBallNumber = undefined; 4767 4768 $scope.vm.forEach(function (companion) { 4769 companion.addToCart = false; 4770 companion.Options.forEach(function (option) { 4771 if (option.Values.length < 1) { 4772 option.hideOption = true; 4773 } else { 4774 if (option.Label === 'Size' || option.Label === 'Waist' || option.Label == 'Inseam' || option.Label == 'GloveSize') { 4775 option.Values.forEach((size) => { 4776 size.SortOrder = getSizeSort(size.Code) 4777 }); 4778 } 4779 } 4780 }) 4781 }) 4782 4783 $form = $window.quickviewJson ? $(".moby-container #quickview-form") : $("#product-form"); 4784 4785 $timeout(function () { 4786 $scope.$productOptions = $("#companion-products").closest('form').find('.product-options'); 4787 4788 $scope.parentOptionsEmpty = true; 4789 //handle autoselect on parent 4790 if ($scope.$productOptions.length && $scope.$productOptions.find("select").length) { 4791 4792 var $dd = $scope.$productOptions.find("select"); 4793 $scope.parentOptionsEmpty = $dd.val() ? false : true; 4794 $scope.parentSkuChange($dd.attr('name'), $dd.val()); 4795 } else { 4796 $scope.parentSizeCode = '000'; 4797 $scope.parentColorCode = '000'; 4798 $scope.parentSkuChange('SizeCode', '000'); //trigger the interlinking 4799 } 4800 4801 applyDefaultSelections(); 4802 }, 500); 4803 } 4804 4805 $scope.$watchGroup(["selectedProduct.ColorCode", "selectedProduct.SizeCode", "selectedProduct.WaistCode", "selectedProduct.InseamCode", "selectedProduct.GolfBallNumber"], function (newVal, oldVal) { 4806 var triggerFlag = false; 4807 4808 if ($scope.sizes != undefined && $scope.sizes.length) { 4809 if ($scope.selectedProduct.SizeCode === undefined) { 4810 triggerFlag = false; 4811 $scope.parentOptionsEmpty = true; 4812 return false; 4813 } else { 4814 $scope.parentSizeCode = $scope.selectedProduct.SizeCode; 4815 $scope.parentSkuChange('SizeCode', $scope.parentSizeCode); 4816 triggerFlag = true; 4817 } 4818 } 4819 4820 if ($scope.colors != undefined && $scope.colors.length) { 4821 if ($scope.selectedProduct.ColorCode === undefined) { 4822 triggerFlag = false; 4823 $scope.parentOptionsEmpty = true; 4824 return false; 4825 } else { 4826 $scope.parentColorCode = $scope.selectedProduct.ColorCode; 4827 $scope.parentSkuChange('ColorCode', $scope.parentColorCode); 4828 triggerFlag = true; 4829 } 4830 } 4831 4832 if ($scope.waists != undefined && $scope.waists.length) { 4833 if ($scope.selectedProduct.WaistCode === undefined) { 4834 triggerFlag = false; 4835 $scope.parentOptionsEmpty = true; 4836 return false; 4837 } else { 4838 $scope.parentWaistCode = $scope.selectedProduct.WaistCode; 4839 $scope.parentSkuChange('WaistCode', $scope.parentWaistCode); 4840 triggerFlag = true; 4841 } 4842 } 4843 4844 if ($scope.inseams != undefined && $scope.inseams.length) { 4845 if ($scope.selectedProduct.InseamCode === undefined) { 4846 triggerFlag = false; 4847 $scope.parentOptionsEmpty = true; 4848 return false; 4849 } else { 4850 $scope.parentInseamCode = $scope.selectedProduct.InseamCode; 4851 $scope.parentSkuChange('InseamCode', $scope.parentInseamCode); 4852 triggerFlag = true; 4853 } 4854 } 4855 4856 4857 if (triggerFlag === true) { 4858 $scope.parentOptionsEmpty = false; 4859 } 4860 });
4861 4862 $scope.$watch('parentOptionsComplete', function (newVal, oldVal) { // back in product options 4863 if (newVal == false || newVal == undefined) return false; 4864 4865 if (newVal == true) { 4866 $scope.parentOptionsEmpty = false; 4867 } 4868 }); 4869 4870 $scope.checkboxChange = function (product, index) { 4871 if (!product.addToCart) { 4872 $('#companion-products > fieldset > div:eq(' + index + ') md-select') 4873 .removeClass("ng-touched ng-invalid ng-invalid-required"); 4874 updateCartButtonText(); 4875 return; 4876 } 4877 4878 var valid = validateProduct(product, undefined, index); 4879 if (!valid) { 4880 product.addToCart = false; 4881 updateCartButtonText(); 4882 return false; 4883 } else { 4884 product.addToCart = true; 4885 } 4886 } 4887 4888 $scope.parentSkuChange = function (name, value) { 4889 var index = 0; 4890 $scope.vm.forEach(function (product) { 4891 var restrict = undefined; 4892 if (name === 'SizeCode') { 4893 $scope.parentSizeCode = value; 4894 restrict = product.SizeRestrictPairs.find(function (srp) { 4895 return srp.includes(value); 4896 }); 4897 } else if (name === 'ColorCode') { 4898 $scope.parentColorCode = value; 4899 restrict = product.ColorRestrictPairs.find(function (crp) { 4900 return crp.includes(value); 4901 }); 4902 } 4903 4904 if (restrict) { 4905 var opt = {}; 4906 product.filtered = false; 4907 var match = restrict.match(/\|(.*)/); 4908 4909 if (name === "SizeCode") { 4910 product.SizeCode = match[1]; 4911 opt = product.Options.find(function (o) { return o.Type === "S" }); 4912 } 4913 if (name === "ColorCode") { 4914 product.ColorCode = match[1]; 4915 opt = product.Options.find(function (o) { return o.Type === "C" }); 4916 } 4917 4918 opt.hideOption = value == undefined || value === "" ? false : true; 4919 $scope.dropDownChange(product, opt, index); 4920 } else { 4921 var restrictions = undefined; 4922 if (name === "SizeCode") { 4923 restrictions = product.SizeRestrictPairs.length > 0; 4924 } else if (name === "ColorCode") { 4925 restrictions = product.ColorRestrictPairs.length > 0; 4926 } 4927 if (restrictions) { 4928 product.addToCart = false; 4929 product.filtered = true; 4930 } 4931 } 4932 4933 index++; 4934 }); 4935 4936 applyDefaultSelections(); 4937 } 4938 4939 $scope.dropDownChange = function (product, opt, index) { 4940 var ddIndex = opt.Values.findIndex(function (o) { 4941 return o.Code === product[opt.Label + 'Code']; 4942 }); 4943 4944 if (ddIndex === -1) { 4945 product.optSelected = false; 4946 product.addToCart = false; 4947 product.Sku = undefined; 4948 4949 if ($scope.parentColorCode || $scope.parentSizeCode) { 4950 product.Options.forEach(function (o) { 4951 if (o.Type === opt.Type) { 4952 var vIndex = opt.Values.findIndex(function (v) { 4953 if (opt.Type === 'C') return v.Code === $scope.parentColorCode; 4954 if (opt.Type === 'S') return v.Code === $scope.parentSizeCode; 4955 }); 4956 //only set it to filtered if its a chained dropdown 4957 if (opt.Type !== "C" && product.Options.length > 1) { 4958 //product.filtered = vIndex === -1; 4959 } 4960 else { 4961 updateCartButtonText(); 4962 } 4963 } 4964 }); 4965 } 4966 4967 return false; 4968 } 4969 4970 product.optSelected = true;
4971 var valid = validateProduct(product, opt, index); 4972 if (!valid) return false; 4973 4974 4975 if (opt.Prices.length) { 4976 product.regPrice = opt.Prices[ddIndex]; 4977 product.clubPrice = opt.ClubPrices[ddIndex]; 4978 product.ClubPriceFlag = opt.ClubPriceFlags[ddIndex]; 4979 product.ExpectDate = opt.ExpectDates[ddIndex]; 4980 //product.SellAction = opt.SellActions[ddIndex]; 4981 } 4982 4983 var nextOptionIndex = undefined; 4984 for (var i = 0; i < product.Options.length; i++) { 4985 if (product.Options[i].Type === product.Options[product.Options.length - 1].Type) break; 4986 if (product.Options[i].Type === opt.Type) { 4987 nextOptionIndex = i + 1; 4988 break; 4989 } 4990 } 4991 if (!nextOptionIndex) { 4992 computeCompanionVariantSku(product); 4993 return false; 4994 } 4995 4996 computeCompanionVariantSku(product); 4997 } 4998 4999 function validateProduct(product, opt, index) { 5000 var valid = true; 5001 if (product == undefined) return false; 5002 if (opt) { 5003 if (!product[opt.Label + 'Code']) { 5004 valid = false; 5005 } 5006 } else { 5007 if (product.Options) { 5008 product.Options.forEach(function (o) { 5009 if ((o.Type === 'S' && !product.SizeCode || product.SizeCode === "undefined") || 5010 (o.Type === 'C' && !product.ColorCode || product.ColorCode === "undefined") || 5011 (o.Type === 'W' && !product.WaistCode || product.WaistCode === "undefined") || 5012 (o.Type === 'I' && !product.InseamCode || product.InseamCode === "undefined") || 5013 (o.Type === 'G' && !product.GloveSizeCode || product.GloveSizeCode === "undefined")) { 5014 valid = false; 5015 } 5016 }); 5017 } 5018 } 5019 5020 if (!valid) { 5021 product.addToCart = false; 5022 $('#companion-products > fieldset > div:eq(' + index + ') md-select') 5023 .addClass("ng-touched ng-invalid ng-invalid-required"); 5024 updateCartButtonText(); 5025 return false; 5026 } else { 5027 product.addToCart = true; 5028 $('#companion-products > fieldset > div:eq(' + index + ') md-select') 5029 .removeClass("ng-touched ng-invalid ng-invalid-required"); 5030 } 5031 5032 updateCartButtonText(); 5033 return valid; 5034 } 5035 5036 function updateCartButtonText() { 5037 var $btns = $('.button.btn-cart').not('.related-products .button.btn-cart'); 5038 var count = $scope.vm.filter(function (product) { 5039 return product.addToCart; 5040 }).length; 5041 5042 if ($window.innerWidth > 960) { 5043 count === 0 ? $btns.text('Add To Cart') : $btns.text('Add ' + (count + 1) + ' Items To Cart'); 5044 } 5045 } 5046 5047 function applyDefaultSelections() { 5048 if (!$scope.vm || !$scope.vm.length) return; 5049 $scope.vm.forEach(function (product, pIndex) { 5050 if (!product.Options || !product.Options.length) return; 5051 product.Options.forEach(function (opt) { 5052 if (!opt.Values || !opt.Values.length) return; 5053 5054 var modelProp = opt.Label + 'Code'; 5055 var current = product[modelProp]; 5056 5057 if (current && current !== "undefined") return; 5058 5059 var chosen; 5060 5061 if (opt.Type === 'S' && $scope.parentSizeCode) { 5062 var match = opt.Values.find(function (v) { return v.Code === $scope.parentSizeCode; }); 5063 if (match) chosen = match.Code; 5064 } 5065 if (opt.Type === 'C' && $scope.parentColorCode) { 5066 var match = opt.Values.find(function (v) { return v.Code === $scope.parentColorCode; }); 5067 if (match) chosen = match.Code; 5068 } 5069 5070 if (!chosen && opt.Values.length === 1) { 5071 chosen = opt.Values[0].Code; 5072 } 5073 5074 if (chosen !== undefined) { 5075 product[modelProp] = chosen; 5076 if ($scope.dropDownChange) { 5077 $scope.dropDownChange(product, opt, pIndex); 5078 } 5079 } 5080 }); 5081 5082 computeCompanionVariantSku(product); 5083 }); 5084 } 5085 5086 function areAllOptionsSelected(product) { 5087 if (!product || !product.Options || !product.Options.length) return false; 5088 5089 for (var i = 0; i < product.Options.length; i++) { 5090 var opt = product.Options[i]; 5091 if (opt.hideOption) continue; 5092 var prop = opt.Label + 'Code'; 5093 var val = product[prop]; 5094 if (val === undefined || val === null || val === "" || val === "undefined") { 5095 return false; 5096 } 5097 } 5098 return true; 5099 } 5100 5101 function findMatchingCompanionVariantSku(product) { 5102 if (!product || !product.CompanionVariants || !product.CompanionVariants.length) return null; 5103 5104 var found = product.CompanionVariants.find(function (variant) { 5105 for (var i = 0; i < product.Options.length; i++) { 5106 var opt = product.Options[i]; 5107 if (opt.hideOption) continue; 5108 5109 var selected = product[opt.Label + 'Code']; 5110 if (selected === undefined || selected === null || selected === "" || selected === "undefined") { 5111 return false; 5112 } 5113 5114 if (opt.Type === 'C' && (variant.ColorCode !== selected)) return false; 5115 if (opt.Type === 'S' && (variant.SizeCode !== selected)) return false; 5116 if (opt.Type === 'W' && (variant.WaistCode !== selected)) return false; 5117 if (opt.Type === 'I' && (variant.InseamCode !== selected)) return false; 5118 if (opt.Type === 'G' && (variant.GloveSizeCode !== selected)) return false; 5119 } 5120 return true; 5121 }); 5122 5123 return found ? found.Sku : null; 5124 } 5125 5126 function computeCompanionVariantSku(product) { 5127 if (!product) return; 5128 5129 if (!areAllOptionsSelected(product)) { 5130 product.Sku = undefined; 5131 product.addToCart = false; 5132 return; 5133 } 5134 5135 var sku = findMatchingCompanionVariantSku(product); 5136 if (sku) { 5137 product.Sku = sku; 5138 } else { 5139 product.Sku = undefined; 5140 } 5141 } 5142 5143 function getSizeSort(size) { 5144 let sortSize = size.toUpperCase(); 5145 console.log(sortSize);
5146 if (sortSize.includes('T-BALL')) return 0.5; 5147 if (sortSize.includes('M/L')) return 2.5; 5148 if (sortSize.includes('L/XL')) return 3.5; 5149 switch (sortSize.toUpperCase()) { 5150 case "XS": 5151 case "X-SMALL": 5152 return 0.5; 5153 break; 5154 case "S": 5155 case "SMALL": 5156 return 1.0; 5157 break; 5158 case "SMALL/MEDIUM": 5159 case "S TO M": 5160 case "S/M": 5161 return 1.5; 5162 break; 5163 case "M": 5164 case "MEDIUM": 5165 return 2.0; 5166 break; 5167 case "MEDIUM/LARGE": 5168 case "M TO L": 5169 case "M/L": 5170 return 2.5; 5171 break; 5172 case "L": 5173 case "LARGE": 5174 return 3.0; 5175 break; 5176 case "LARGE/X-LARGE": 5177 case "L TO XL": 5178 case "L/XL": 5179 return 3.5; 5180 break; 5181 case "XL": 5182 case "X-LARGE": 5183 return 4.0; 5184 break; 5185 case "2XL": 5186 case "XX-LARGE": 5187 return 5.0; 5188 break; 5189 case "3XL": 5190 case "XXX-LARGE": 5191 return 6.0; 5192 break; 5193 default: 5194 if (sortSize.includes('US / ')) { 5195 var splitSize = sortSize.split('US / '); 5196 if (splitSize.length > 1) { 5197 var splitEU = splitSize[1].split(' '); 5198 if (splitEU.length > 0) { 5199 let euSize = splitEU[0]; 5200 if ((parseInt(euSize) != NaN) || (parseFloat(euSize) != NaN)) { 5201 return +euSize; 5202 } 5203 } 5204 } 5205 } 5206 5207 if (sortSize.includes(' / WOMENS')) { 5208 var splitSize = sortSize.split(' / WOMENS'); 5209 if (splitSize.length > 1) { 5210 var splitMens = splitSize[0].split(' '); 5211 if (splitMens.length > 0) { 5212 let mensSize = splitMens[1]; 5213 if ((parseInt(mensSize) != NaN) || (parseFloat(mensSize) != NaN)) { 5214 return +mensSize; 5215 } 5216 } 5217 } 5218 } 5219 5220 if ((parseInt(size) == NaN) && (parseFloat(size) == NaN)) 5221 return size; 5222 else { 5223 return +size; 5224 } 5225 } 5226 } 5227} 5228 5229CompanionProductsController.$inject = ['$scope', '$window', '$timeout', '_productService'];; 5230var FreeGiftController = function ($scope, $mdDialog) { 5231 this.$onInit = function () { 5232 $scope.FreeGift = $scope.data.GiftWithPurchase; 5233 5234 $scope.giftColors = []; 5235 $scope.giftSizes = []; 5236 5237 $scope.originalGiftColors = []; 5238 $scope.originalGiftSizes = []; 5239 5240 $scope.FreeGift.FreeGiftColorCode = undefined; 5241 $scope.FreeGift.FreeGiftSizeCode = undefined; 5242 $scope.SelectedGift = {}; 5243 $scope.SelectedGift.SizeCode = undefined; 5244 $scope.SelectedGift.ColorCode = undefined; 5245 5246 GWPParentLineID = undefined; 5247 } 5248 5249 $scope.$watch("FreeGift.FreeGiftColorCode", function (newVal, oldVal) { 5250 if (newVal == undefined) { 5251 if ($scope.giftSizes.length) { 5252 $scope.giftSizes = $scope.originalGiftSizes; 5253 $scope.SelectedGift.SizeCode = undefined; 5254 } 5255 return false; 5256 } 5257 5258 if (newVal != undefined && newVal != oldVal) { 5259 // if there are no sizes 5260 if ($scope.giftSizes.length < 1) { 5261 // return the color match 5262 $scope.FreeGift.Variants.find(function (variant) { 5263 if (variant.ColorCode == newVal) { 5264 $scope.SelectedGift.ColorCode = variant.ColorCode; 5265 $scope.SelectedGift = variant; 5266 } 5267 }) 5268 } else { 5269 // there are sizes 5270 // make sure they have a size code 5271 if ($scope.SelectedGift.SizeCode != undefined) { 5272 // check the variant matches size code and color code 5273 $scope.FreeGift.Variants.find(function (variant) { 5274 if (variant.ClothingTeamCode != null && variant.ClothingTeamName != null) { 5275 if (variant.ClothingTeamCode == newVal && variant.SizeCode == $scope.SelectedGift.SizeCode) { 5276 $scope.SelectedGift = variant; 5277 $scope.SelectedGift.ColorCode = variant.ClothingTeamCode; 5278 } 5279 } else if (variant.ColorCode == newVal && variant.SizeCode == $scope.SelectedGift.SizeCode) { 5280 $scope.SelectedGift = variant; 5281 $scope.SelectedGift.ColorCode = variant.ColorCode; 5282 } 5283 }) 5284 } 5285 } 5286 } 5287 });
5288 5289 $scope.$watch("FreeGift.FreeGiftSizeCode", function (newVal, oldVal) { 5290 5291 if (newVal == undefined) { 5292 $scope.giftColors = $scope.originalGiftColors; 5293 $scope.giftSizes = $scope.originalGiftSizes; 5294 return false; 5295 } 5296 5297 if (newVal != undefined && newVal != oldVal) { 5298 if ($scope.giftColors.length > 0) { 5299 $scope.FreeGift.Variants.find(function (variant) { 5300 if (variant.SizeCode == newVal) { 5301 $scope.SelectedGift.SizeCode = variant.SizeCode; 5302 } 5303 }) 5304 let uniqueColors = $scope.FreeGift.Variants 5305 .map(item => item.ClothingTeamName != null ? item.ClothingTeamCode : item.ColorCode) 5306 .filter((value, index, self) => self.indexOf(value) === index); 5307 $scope.giftColors = $scope.originalGiftColors.filter(color => uniqueColors.includes(color.code)); 5308 console.log('compare: ', uniqueColors, $scope.originalGiftColors) 5309 } else { 5310 // no colors 5311 $scope.FreeGift.Variants.find(function(variant) { 5312 if (variant.SizeCode == newVal) { 5313 $scope.SelectedGift = variant; 5314 return; 5315 } 5316 }) 5317 } 5318 } 5319 5320 }) 5321 5322 $scope.freeGiftModal = function () { 5323 populateGiftSizesAndColors(); 5324 $scope.modal = { 5325 customCssClass: "", 5326 title: "Free Gift With Purchase", 5327 templateUrl: "/templates/pdp/free-gift-modal.html", 5328 clickOutsideToClose: false, 5329 focusOnOpen: true, 5330 } 5331 return $mdDialog.show($mdDialog.modal({ scope: $scope })); 5332 }; 5333 5334 $scope.submitGiftSelection = function () { 5335 let variant; 5336 5337 if ($scope.FreeGift.Variants.length) { 5338 $scope.FreeGift.Variants.find(function (_variant) { 5339 if (_variant.ColorCode == $scope.SelectedGift.ColorCode && _variant.SizeCode == $scope.SelectedGift.SizeCode) 5340 variant = _variant; 5341 }) 5342 } else { 5343 variant = $scope.FreeGift; 5344 } 5345 5346 if (variant == undefined) return false; 5347 let giftForm = { 5348 ID: variant.Sku.replace("I", ""), 5349 PromoCode: "WX2", 5350 ColorCode: $scope.SelectedGift.ColorCode, 5351 SizeCode: $scope.SelectedGift.SizeCode, 5352 Quantity: $scope.data.GWPLimitOnePerOrder === true ? 1 : $scope.formData.quantity, 5353 ParentLineItemID: GWPParentLineID, 5354 Sku: variant.ID == 26380 ? variant.Sku : null, 5355 }; 5356 5357 if (variant.IsGiftCard == true || $scope.FreeGift.ID == 26380) { 5358 giftForm.ID = $scope.FreeGift.ID; 5359 } 5360 5361 $mdDialog.hide(); 5362 $scope.giftColors = []; 5363 $scope.giftSizes = []; 5364 $scope.originalGiftColors = []; 5365 $scope.originalGiftSizes = []; 5366 5367 return $scope.finishAddingToCart(giftForm, true); 5368 5369 }; 5370 5371 function populateGiftSizesAndColors() {
5372 $scope.FreeGift.Variants.forEach(function (variant, index) { 5373 if (variant.SellAction !== "X") { 5374 var c = $scope.giftColors.findIndex(x => x.code === variant.ColorCode); 5375 if (variant.ClothingTeamCode != null && variant.ClothingTeamName != null) { 5376 var t = $scope.giftColors.findIndex(x => x.code === variant.ClothingTeamCode); 5377 if (t <= -1) { 5378 $scope.giftColors.push({ 5379 code: variant.ClothingTeamCode, 5380 desc: variant.ClothingTeamName 5381 }); 5382 } 5383 } else if (c <= -1 && variant.ColorDescription != null && variant.ColorDescription.length > 0) { 5384 $scope.giftColors.push({ 5385 code: variant.ColorCode, 5386 desc: variant.ColorDescription 5387 }); 5388 } 5389 5390 var s = $scope.giftSizes.findIndex(s => s.code === variant.SizeCode); 5391 if (s <= -1 && variant.SizeDescription != null && variant.SizeDescription.length > 0) { 5392 $scope.giftSizes.push({ 5393 code: variant.SizeCode, 5394 desc: variant.SizeDescription 5395 }); 5396 } 5397 } 5398 }) 5399 $scope.originalGiftColors = $scope.giftColors; 5400 $scope.originalGiftSizes = $scope.giftSizes; 5401 }; 5402} 5403 5404FreeGiftController.$inject = ['$scope', '$mdDialog'];; 5405var GloveBreakInController = function ($scope, $mdDialog) { 5406 this.$onInit = function () { 5407 $scope.data.GloveBreakInService = false; 5408 } 5409 5410 $scope.openBreakInModal = function () { 5411 $scope.modal = { 5412 customCssClass: "GloveBreakInModal-container", 5413 title: "Play Baseball 4-step Glove Break-In Service", 5414 templateUrl: "/templates/shared/glove-break-in-modal.html" 5415 } 5416 return $mdDialog.show($mdDialog.modal({ scope: $scope })); 5417 } 5418 5419 $scope.addBreakInService = function () { 5420 $scope.data.GloveBreakInService = !$scope.data.GloveBreakInService; 5421 } 5422} 5423 5424GloveBreakInController.$inject = ['$scope', '$mdDialog'];; 5425var ImageGalleryController = function ($scope, $mdDialog) { 5426 5427 this.$onInit = function () { 5428 $scope.magicReady = false; 5429 $scope.selectedImage = undefined; 5430 } 5431 5432 $scope.$on('thumbs:ready', function () { 5433 MagicZoom.start('main-image'); //start magic zoom 5434 }); 5435 5436 $scope.swapImage = function (event, swapATC) { 5437 if (event != undefined) { 5438 var $btn = event.target ? $(event.target.parentElement) : $(event); 5439 5440 var $allImages = $btn.closest("#product-thumbs").find(".product-slide.product-image"); 5441 var selectedImageIndex = $allImages.find(".mz-thumb").index($btn); 5442 5443 var $countIndicators = $(".count-indicators"); 5444 var $dot = $countIndicators.find(".dot"); 5445 if (selectedImageIndex >= 0) { 5446 $dot.removeClass("mz-thumb-selected"); 5447 $dot.eq(selectedImageIndex).addClass("mz-thumb-selected"); 5448 } 5449 5450 $(".mainImageCaption").html($btn[0].dataset.swap); 5451 $btn.closest(".product-slide").find(".button").removeClass("mz-thumb-selected"); 5452 $btn.closest(".product-slide").find("[aria-current=true]").removeAttr("aria-current"); 5453 $btn.attr("aria-current", "true"); 5454 $btn.addClass("mz-thumb-selected"); 5455 5456 if ($btn[0]) { 5457 var $thisImage = $btn[0].dataset.image; 5458 var $btnImg = $btn.find("img"); 5459 5460 $scope.mainImageDisplay($thisImage, $btnImg); 5461 5462 if (swapATC && $btn[0].dataset.image && $("#stickyAddToCart").length) { 5463 var $newImage = $thisImage.replace("/l/", "/m/"); 5464 var $stickyATC = $("#stickyAddToCart .product-image img"); 5465 $stickyATC.attr("src", $newImage); 5466 if ($stickyATC.attr('data-src')) 5467 $stickyATC.attr("data-src", $newImage); 5468 } 5469 } 5470 } 5471 5472 return false; 5473 } 5474 5475 $scope.assignMainImage = function (originalImageIndex, newImageIndex, allImagesArray, dot) { 5476 $(".mainImageCaption").html(allImagesArray[newImageIndex].dataset.swap); 5477 $(allImagesArray[originalImageIndex]).find("button").removeClass("mz-thumb-selected"); 5478 $(allImagesArray[originalImageIndex]).find("[aria-current=true]").removeAttr("aria-current"); 5479 $(allImagesArray[newImageIndex]).find("button").attr("aria-current", "true"); 5480 $(allImagesArray[newImageIndex]).find("button").addClass("mz-thumb-selected"); 5481 dot.removeClass("mz-thumb-selected"); 5482 dot.eq(newImageIndex).addClass("mz-thumb-selected"); 5483 5484 } 5485 5486 $scope.imageWraparound = function (direction, selectedImageIndex, allImagesArray, dot) { 5487 if (direction == "left") { 5488 //check if there are any more images to the left that are visible, if not then cycle to the rightmost image 5489 for (let i = allImagesArray.length; i >= selectedImageIndex; i--) { 5490 if ($(allImagesArray[i]).is(':visible')) { 5491 $scope.assignMainImage(selectedImageIndex, i, allImagesArray, dot); 5492 5493 return i; 5494 } 5495 } 5496 } 5497 else if (direction == "right") { 5498 //check if there are any more images to the right that are visible, if not then cycle to the leftmost image 5499 for (let i = 0; i <= selectedImageIndex; i++) { 5500 if ($(allImagesArray[i]).is(':visible')) { 5501 $scope.assignMainImage(selectedImageIndex, i, allImagesArray, dot); 5502 5503 return i; 5504 } 5505 } 5506 } 5507 } 5508 5509 $scope.mainImageDisplay = function (thisImage, btnImg) { 5510 if (btnImg[0]) { 5511 if (btnImg[0].currentSrc.includes("noimage56x56.jpg")) 5512 thisImage = "/images/noimage1155x1155.jpg"; 5513 } 5514 5515 if ($scope.magicReady) { 5516 MagicZoom.update("main-image", thisImage, thisImage); 5517 } 5518 else { 5519 var $mainImage = $("#main-image").find("img").first(); 5520 if ($mainImage.attr('src') !== thisImage) { 5521 $mainImage.attr("src", thisImage); 5522 } 5523 } 5524 } 5525 5526 $scope.moveLeft = function (event, swapATC) { 5527 if (event != undefined) { 5528 var $gallery = $("#product-thumbs"); 5529 var $allImages = $gallery.find(".product-slide.product-image"); 5530 var selectedImageIndex = $allImages.index($allImages.has('.mz-thumb-selected')); 5531 5532 var $countIndicators = $(".count-indicators"); 5533 var $dot = $countIndicators.find(".dot"); 5534 var leftImageFound = false; 5535 5536 for (let i = selectedImageIndex - 1; i >= 0; i--) { 5537 if ($($allImages[i]).is(':visible')) { 5538 $scope.assignMainImage(selectedImageIndex, i, $allImages, $dot); 5539 5540 leftImageFound = true; 5541 selectedImageIndex = i; 5542 break; 5543 } 5544 } 5545 5546 if (leftImageFound == false) { 5547 selectedImageIndex = $scope.imageWraparound("left", selectedImageIndex, $allImages, $dot); 5548 } 5549 5550 var $thisImage = $($allImages[selectedImageIndex]).find("button").get(0)?.dataset.image; 5551 var $btnImg = $($allImages[selectedImageIndex]).find("button").find("img"); 5552 5553 $scope.mainImageDisplay($thisImage, $btnImg); 5554 5555 if (swapATC && $($allImages[selectedImageIndex]).find("button").dataset.image && $("#stickyAddToCart").length) { 5556 var $newImage = $thisImage.replace("/l/", "/m/"); 5557 var $stickyATC = $("#stickyAddToCart .product-image img"); 5558 $stickyATC.attr("src", $newImage); 5559 if ($stickyATC.attr('data-src')) 5560 $stickyATC.attr("data-src", $newImage); 5561 } 5562 5563 $scope.animateGallery(selectedImageIndex, $allImages); 5564 } 5565 5566 return false; 5567 } 5568 5569 $scope.moveRight = function (event, swapATC) { 5570 if (event != undefined) { 5571 var $gallery = $("#product-thumbs"); 5572 var $allImages = $gallery.find(".product-slide.product-image"); 5573 var selectedImageIndex = $allImages.index($allImages.has('.mz-thumb-selected')); 5574 5575 var $countIndicators = $(".count-indicators"); 5576 var $dot = $countIndicators.find(".dot"); 5577 rightImageFound = false; 5578 5579 for (let i = selectedImageIndex + 1; i < $allImages.length ; i++) { 5580 if ($($allImages[i]).is(':visible')) { 5581 $scope.assignMainImage(selectedImageIndex, i, $allImages, $dot); 5582 5583 rightImageFound = true; 5584 selectedImageIndex = i; 5585 break; 5586 } 5587 } 5588 5589 if (rightImageFound == false) { 5590 selectedImageIndex = $scope.imageWraparound("right", selectedImageIndex, $allImages, $dot); 5591 } 5592 5593 var $thisImage = $($allImages[selectedImageIndex]).find("button").get(0)?.dataset.image; 5594 var $btnImg = $($allImages[selectedImageIndex]).find("button").find("img"); 5595 5596 $scope.mainImageDisplay($thisImage, $btnImg); 5597 5598 if (swapATC && $($allImages[selectedImageIndex]).find("button").dataset.image && $("#stickyAddToCart").length) { 5599 var $newImage = $thisImage.replace("/l/", "/m/"); 5600 var $stickyATC = $("#stickyAddToCart .product-image img"); 5601 $stickyATC.attr("src", $newImage); 5602 if ($stickyATC.attr('data-src')) 5603 $stickyATC.attr("data-src", $newImage); 5604 } 5605 5606 $scope.animateGallery(selectedImageIndex, $allImages); 5607 } 5608 5609 return false; 5610 } 5611 5612 //animate the image gallery to selected image tile 5613 $scope.animateGallery = function (selectedImageIndex, imagesArray) { 5614 var $container = $("#product-thumbs"); 5615 var containerLeft = $container.offset().left; 5616 var containerScrollLeft = $container.scrollLeft(); 5617 var containerWidth = $container.width(); 5618 5619 var $btn = $(imagesArray[selectedImageIndex]).find("button"); 5620 var btnLeft = $btn.offset().left; 5621 var btnWidth = $btn.outerWidth(); 5622 5623 if (btnLeft < containerLeft) { 5624 $container.animate({ scrollLeft: containerScrollLeft + (btnLeft - containerLeft) }, 50); 5625 } else if (btnLeft + btnWidth > containerLeft + containerWidth) { 5626 $container.animate({ scrollLeft: containerScrollLeft + (btnLeft + btnWidth - (containerLeft + containerWidth)) }, 50); 5627 } 5628 } 5629 5630 $scope.loadAudio = function (media) { 5631 $scope.audioFile = media.FileName; 5632 $scope.modal = { templateUrl: "/templates/pdp/audio.html" } 5633 return $mdDialog.show($mdDialog.modal({ scope: $scope })); 5634 } 5635 5636 $scope.closeDialog = function () { 5637 $mdDialog.hide(); 5638 $scope.modal = undefined; 5639 $scope.audioFile = undefined; 5640 } 5641} 5642 5643ImageGalleryController.$inject = ['$scope', '$mdDialog'];; 5644var ProductClubAddToCartController = function ($scope, $compile, $templateRequest, $mdDialog) { 5645 5646 $scope.initClubDetails = function () { 5647 var content = angular.element('<button href="javascript:void(0);" type="button" ng-click="clbATCDetails()" class="clb-pdp-link">Details</button>'); 5648 var element = angular.element("#club-atc-details-link"); 5649 var compiled = $compile(content)($scope); 5650 if (typeof element !== 'undefined') element.append(compiled[0]); 5651 }; 5652 5653 $scope.clbATCDetails = function () { 5654 $scope.modal = { 5655 customCssClass: "md-club-atc-details-pdp-modal", 5656 title: "", 5657 templateUrl: "/templates/pdp/club-atc-pdp-details-modal.html" 5658 } 5659 $mdDialog.show($mdDialog.modal({ scope: $scope })); 5660 } 5661 5662 $scope.clbATCClose = function() { 5663 $scope.closeDialog(); 5664 } 5665 5666 $scope.closeDialog = function() { 5667 $mdDialog.hide(); 5668 } 5669} 5670ProductClubAddToCartController.$inject = ['$scope', '$compile', '$templateRequest', '$mdDialog'];; 5671var ProductGroupController = function ($scope, $window, $timeout, $interval, $mdSidenav) { 5672 5673 this.$onInit = function () { 5674 // ProductModel.cs is eager loaded by the server due to evaluation on the server for seo redirect 5675 $scope.vm = $window.productJson; 5676 $scope.totalOptions = $scope.vm.TableData.DataRows.length; 5677 5678 if ($scope.vm.MonetatePDPScript.length) { 5679 let pdpDiv = $('#monetateAjax'); 5680 pdpDiv.empty(); 5681 if (pdpDiv.length) { 5682 pdpDiv.append($scope.vm.MonetatePDPScript); 5683 } 5684 } 5685 5686 return $scope.setAttrFilters(); 5687 } 5688 5689 $scope.$on('tiles:ready', function () { 5690 var interval = $interval(function () { 5691 if (!document.querySelector(".detail-buttons")) return false; 5692 5693 $interval.cancel(interval); 5694 hookUpQuickViews($(".detail-buttons")); 5695 5696 $('.notifyBtn').find("a").moby({ //yuck 5697 'modalClass': 'giveaway-modal notifyMeModal', 5698 'ariaLabelText': 'Notify Me', 5699 'bodyClose': true, 5700 'keyActions': true, 5701 'onCompleteCallback': function () { 5702 setTimeout(function () { 5703 trapFocus($(".notifyMeModal")); 5704 }, 500); 5705 }, 5706 'onBeforeCloseCallback': function () { 5707 $('.moby-container.notifyMeModal').removeClass('notifyMeModalSubmit'); 5708 $('.moby-container.notifyMeModal .moby-close img').remove(); 5709 } 5710 }); 5711 }, 100); 5712 });
5713 5714 $scope.setAttrFilters = function() { 5715 $scope.attrFilters = []; 5716 5717 $scope.vm.TableData.Attributes.forEach(function(attr) { 5718 $scope.attrFilters.push({ 5719 name: attr.AttributeNames[0], 5720 selectedFilter: undefined, //chosen value in drop down stored here 5721 attr: attr.Attrs[0], 5722 typeLevel: attr.TypeLevel, 5723 values: [] 5724 }); 5725 }); 5726 5727 for (var i = 0; i < $scope.attrFilters.length; i++) { 5728 $scope.vm.TableData.DataRows.forEach(function (row) { 5729 if (row.AttributeData[i] !== "" && $scope.attrFilters[i].values.indexOf(row.AttributeData[i]) === -1) { 5730 $scope.attrFilters[i].values.push(row.AttributeData[i]); 5731 } 5732 }); 5733 } 5734 5735 return false; 5736 } 5737 5738 $scope.chainedFilter = function (filter) { 5739 if (filter == undefined) return true; 5740 5741 var selectedFilters = [], currentIndex; 5742 for (var i = 0; i < $scope.attrFilters.length; i++) { 5743 if ($scope.attrFilters[i].selectedFilter != undefined) { 5744 selectedFilters.push($scope.attrFilters[i].selectedFilter); 5745 currentIndex = i; 5746 } 5747 } 5748 if (selectedFilters.length === 0) return true; 5749 5750 var availableFilters = []; 5751 $scope.vm.TableData.DataRows.forEach(function (product) { 5752 for (var i = 0; i < product.AttributeData.length; i++) { 5753 //show all available in current dropdown level if there is only one selection 5754 if (availableFilters.indexOf(product.AttributeData[i]) === -1) { 5755 if ((selectedFilters.length === 1 && i === currentIndex) || product.AttributeData.isSubset(selectedFilters)) { 5756 availableFilters.push(product.AttributeData[i]); 5757 } 5758 } 5759 } 5760 }); 5761 5762 return availableFilters.indexOf(filter) >= 0; 5763 } 5764 5765 //dont run on ng-change on mobile 5766 $scope.applyFilter = function () { 5767 if ($window.innerWidth <= 960) return false; 5768 applyFilter(); 5769 } 5770 5771 //make them press a button on mobile 5772 $scope.mobileApplyFilter = function() { 5773 applyFilter(); 5774 } 5775 5776 $scope.resetFilter = function() { 5777 $scope.attrFilters.forEach(function (attrFilter) { 5778 attrFilter.selectedFilter = undefined; 5779 }); 5780 5781 $scope.totalOptions = $scope.vm.TableData.DataRows.length; 5782 $scope.vm.TableData.DataRows.forEach(function(product) { 5783 product.filtered = false; 5784 }); 5785 } 5786 5787 $scope.toggleSidenav = function (id) { 5788 $mdSidenav(id).toggle(); 5789 } 5790 5791 function applyFilter() { 5792 $scope.loading = true; 5793 5794 $timeout(function () { //show loading icon so user knows something happened 5795 var selectedFilters = $scope.attrFilters.filter(function(attr) { return attr.selectedFilter; }); 5796 $scope.totalOptions = 0; 5797 $scope.vm.TableData.DataRows.forEach(function(data) { 5798 data.filtered = false; 5799 var results = []; 5800 for (var i = 0; i < selectedFilters.length; i++) { 5801 var match = data.AttributeData.some(function(attr) { 5802 return selectedFilters[i].selectedFilter === attr; 5803 }); 5804 5805 results.push(match); 5806 } 5807 5808 data.filtered = !results.every(function(r) { return r === true }); 5809 if (!data.filtered) $scope.totalOptions++; 5810 }); 5811 5812 $scope.loading = false; 5813 }, 500); 5814 } 5815} 5816 5817ProductGroupController.$inject = ['$scope', '$window', '$timeout', '$interval', '$mdSidenav'];; 5818var ProductOptionsController = function ($scope, $rootScope, $mdDialog, $sanitize, _productService, $document, $timeout, $filter, $window) { 5819 5820 var $form; 5821 5822 this.$onInit = function () { 5823 $scope.data = $window.quickviewJson ? $window.quickviewJson : $window.productJson; 5824 if ($scope.data == undefined) return false; 5825 $scope.originalClearanceValue = $scope.data.ShowClearanceFlag; 5826 $scope.originalWasPriceDisplay = $scope.data.WasPriceDisplay; // used for variant clearance flags 5827 5828 if ($scope.data.Variants != undefined && $scope.data.Variants.length > 0 && $scope.data.Variants.find(v => v.Clearance === true && v.SellAction !== 'X')) { 5829 $scope.data.ShowClearanceFlag = true; 5830 } 5831 5832 $scope.atcReadyFired = false; 5833 5834 // redo stuff 5835 $scope.originalMasterPrice = ""; // for memory 5836 $scope.masterPrice = ""; // for display 5837 5838 $scope.allVariantsOnSale = false; 5839 5840 $scope.notifyResponse = {}; 5841 5842 $scope.widths = []; 5843 $scope.sizes = []; 5844 $scope.colors = []; 5845 $scope.batLengths = []; 5846 $scope.batWeights = []; 5847 $scope.throws = []; 5848 $scope.bats = []; 5849 $scope.teamNames = []; 5850 5851 $scope.giftCards = []; 5852 $scope.gcVariantSelected = false; 5853 5854 $scope.selectedProduct = {}; 5855 $scope.selectedProduct.SizeCode = undefined; 5856 $scope.selectedProduct.WidthCode = undefined; 5857 $scope.selectedProduct.ColorCode = undefined; 5858 $scope.selectedProduct.ColorDesc = undefined; 5859 $scope.selectedProduct.ThrowCode = undefined; 5860 $scope.selectedProduct.BatCode = undefined; 5861 $scope.selectedProduct.TeamCode = undefined; 5862 $scope.selectedProduct.TeamName = undefined; 5863 $scope.selectedProduct.BatLengthCode = undefined; 5864 $scope.selectedProduct.BatWeightCode = undefined; 5865 $scope.selectedProduct.GiftCardCode = undefined; 5866 5867 $scope.originalPNumber = $scope.data.ID;
5868 $scope.iNumberDisplay = undefined; 5869 $scope.skuLevelUpc = undefined; 5870 5871 $scope.variant = undefined; 5872 5873 $scope.changeVariants = undefined; 5874 $scope.resetColor = false; 5875 $scope.resetTeam = false; 5876 $scope.resetSize = false; 5877 $scope.resetWidth = false; 5878 $scope.resetBatHand = false; 5879 $scope.resetThrowHand = false; 5880 $scope.resetBatLength = false; 5881 $scope.resetBatWeight = false; 5882 5883 $scope.inSingleVariant = false; 5884 $scope.parentOptionsComplete = false; 5885 5886 $scope.selectedOrder = []; 5887 $scope.selectedCount = 0; 5888 5889 if ($scope.data.Variants.length > 0) { 5890 if ($scope.data.Variants.every(v => v.SaleType === "S")) $scope.allVariantsOnSale = true; 5891 } 5892 5893 if ($scope.data.Variants.length > 1) { // don't show sell action X prices 5894 var filtered = $scope.data.Variants.filter(v => v.MaxPrice <= $scope.data.MaxPrice && v.SellAction != 'X'); 5895 if (filtered.length > 0) { 5896 if (filtered.every(v => v.MaxPrice === $scope.data.MinPrice)) { 5897 $scope.data.Price = filtered[0].Price; 5898 } else if ($scope.data.ID != 26380) { 5899 var minPrice = 0, maxPrice = 0; 5900 filtered.forEach(function (variant) { 5901 if (variant.MaxPrice > maxPrice) maxPrice = variant.MaxPrice; 5902 if (variant.MinPrice < maxPrice && variant.MinPrice > minPrice) minPrice = variant.MinPrice; 5903 }) 5904 $scope.data.Price = $scope.data.CurrencyDisplay + minPrice.toFixed(2) + " - " + $scope.data.CurrencyDisplay + maxPrice.toFixed(2); 5905 } 5906 } 5907 } 5908 5909 $scope.masterPrice = $scope.data.Price; 5910 5911 if ($scope.data.IsMapPriceDisplay) { 5912 $scope.originalMasterPrice = "Add To Cart To See Price"; 5913 $scope.masterPrice = "Add To Cart To See Price"; 5914 } else { 5915 $scope.originalMasterPrice = $scope.data.Price; 5916 } 5917 5918 if ($scope.data.Media != null) { 5919 var videos = $scope.data.Media.filter(v => v.CloudflareKey != null); 5920 var scope = angular.element("#ImageGalleryController").scope(); 5921 if (scope != undefined) { 5922 scope.media = videos; 5923 } 5924 } 5925 5926 $form = $window.quickviewJson ? $(".moby-container #quickview-form") : $("#product-form"); 5927 if ($window.quickviewJson != undefined) { $scope.data.IsQuickView = true } 5928 5929 if ($scope.data.GiftWithPurchase != null) { 5930 var giftScope = angular.element('FreeGiftController').scope(); 5931 if (giftScope != undefined) { 5932 giftScope.FreeGift = $scope.data.GiftWithPurchase; 5933 } 5934 } 5935 5936 if (!$scope.data.IsGiftCard) { 5937 $scope.populateSizesAndColors(); 5938 } else if ($scope.data.IsGiftCard || $scope.data.ID == 26380) { 5939 $scope.populateGiftCards(); 5940 } 5941 5942 if (!$scope.data.Variants.length && $scope.data.IsPresale && $scope.data.InventoryMessage.length > 0 && $scope.data.SellAction === 'B') { 5943 // presale messaging 5944 $scope.data.HasBackorderMessage = true; 5945 $scope.data.StockMessage = $scope.data.InventoryMessage; 5946 } else if ($scope.data.SellAction === 'B' && $scope.data.IsPresale == false && !$scope.data.Variants.length) { 5947 $scope.data.StockMessage = $scope.data.InventoryMessage; 5948 $scope.data.HasBackorderMessage = true; 5949 } else if ($scope.data.Variants.length == 1) { 5950 if ($scope.data.SellAction == 'S' || $scope.data.SellAction == 'B') { 5951 $scope.data.StockMessage = "In Stock"; 5952 $scope.data.HasBackorderMessage = false; 5953 } 5954 } 5955 5956 if ($scope.data.MonetatePageScript.length || $scope.data.MonetateProductScript.length || $scope.data.MonetateCartScript.length || $scope.data.MonetateBreadCrumbScript.length) { 5957 var fullMonetateScript = ""; 5958 5959 if ($scope.data.MonetatePageScript && $scope.data.MonetatePageScript.length) { 5960 fullMonetateScript = $scope.data.MonetatePageScript; 5961 } 5962 5963 if ($scope.data.MonetateProductScript && $scope.data.MonetateProductScript.length) { 5964 fullMonetateScript = fullMonetateScript + $scope.data.MonetateProductScript; 5965 } 5966 5967 if ($scope.data.MonetateCartScript && $scope.data.MonetateCartScript.length) { 5968 fullMonetateScript = fullMonetateScript + $scope.data.MonetateCartScript; 5969 } 5970 5971 if ($scope.data.MonetateBreadCrumbScript && $scope.data.MonetateBreadCrumbScript.length) { 5972 fullMonetateScript = fullMonetateScript + $scope.data.MonetateBreadCrumbScript; 5973 } 5974 5975 fullMonetateScript = fullMonetateScript + "<script id=\"monetateTrackData\" type=\"text/javascript\"> window.monetateQ.push([\"trackData\"]);<\/script>"; 5976 5977 var monetateScript = $('#monetateAjax'); 5978 monetateScript.empty(); 5979 if (monetateScript.length) { 5980 monetateScript.append(fullMonetateScript); 5981 } 5982 } 5983
5984 $scope.sezzlePayment = $scope.data.InstallmentPriceSezzle; 5985 } 5986 5987 //************************** 5988 // WATCHES 5989 //************************** 5990 5991 $scope.$on('addToCart:ready', function () { 5992 $scope.atcReady(); 5993 }); 5994 5995 $scope.$watch("variant", function (newVal, oldVal) { 5996 if (newVal == undefined) { 5997 $scope.flipDisabledAddToCartButton(true, false); 5998 } else if (newVal != undefined) { 5999 $scope.flipDisabledAddToCartButton(false, false); 6000 } 6001 let skuElement = $("#details-sku"); 6002 if (newVal != undefined && newVal.Sku) { 6003 skuElement.html("SKU: " + newVal.Sku); 6004 skuElement.show(); 6005 } else { 6006 skuElement.hide(); 6007 } 6008 }); 6009 6010 $scope.$watch("masterPrice", function (newVal, oldVal) { 6011 if (!$scope.data.IsQuickView) { 6012 $("#stickyAddToCart #stickyPricePH .price-box .price-box-child .regular-price").text(newVal); 6013 } 6014 }); 6015 6016 $scope.$watch("selectedProduct.GiftCardCode", function (newVal, oldVal) { 6017 if (newVal == undefined && oldVal == undefined) return false; 6018 6019 $scope.selectedPill($scope.giftCards, newVal); 6020 6021 if (newVal == undefined) { 6022 $scope.selectedProduct.GiftCardCode = undefined; 6023 $scope.masterPrice = $scope.originalMasterPrice; 6024 $scope.iNumberDisplay = undefined; 6025 $scope.skuLevelUpc = undefined; 6026 $scope.gcVariantSelected = false; 6027 } 6028 else if (newVal != undefined) { 6029 var variant = $scope.data.Variants.find(v => v.SellAction != "X" && v.Sku == newVal); 6030 $scope.masterPrice = variant.Price; 6031 $scope.data.StockMessage = "In Stock"; 6032 $scope.variant = variant; 6033 let scope = angular.element(document.getElementById('GiftCardRecipientController')).scope(); 6034 if (scope != undefined) { 6035 $scope.gcVariantSelected = true; 6036 scope.gcVariantSelected = true; 6037 scope.prepareForm(); 6038 } 6039 } 6040 }); 6041 6042 $scope.$watch("selectedProduct.SizeCode", function (newVal, oldVal) { 6043 if (newVal == undefined && oldVal == undefined) return false; 6044 6045 $scope.selectedPill($scope.sizes, newVal); 6046 6047 if (!$scope.inSingleVariant) { 6048 $scope.checkNullAttribute(newVal); 6049 6050 if (newVal != undefined) { 6051 $scope.processThisSelection('size'); 6052 } 6053 else $scope.resetOrderOption('size'); 6054 } 6055 }); 6056 6057 $scope.$watch("selectedProduct.WidthCode", function (newVal, oldVal) { 6058 if (newVal == undefined && oldVal == undefined) return false; 6059 6060 $scope.selectedPill($scope.widths, newVal); 6061 6062 if (!$scope.inSingleVariant) { 6063 $scope.checkNullAttribute(newVal); 6064 6065 if (newVal != undefined) { 6066 $scope.processThisSelection('shoeWidth'); 6067 } 6068 else $scope.resetOrderOption('shoeWidth'); 6069 } 6070 }); 6071 $scope.$watch("selectedProduct.ColorCode", function (newVal, oldVal) { 6072 if (newVal == undefined && oldVal == undefined) return false; 6073 $scope.selectedPill($scope.colors, newVal); 6074 6075 if (!$scope.inSingleVariant) { 6076 $scope.checkNullAttribute(newVal); 6077 6078 if (newVal != undefined) { 6079 $scope.processThisSelection('color'); 6080 } 6081 else $scope.resetOrderOption('color'); 6082 } 6083 6084 $timeout(function () { 6085 if (newVal != undefined) { 6086 $scope.checkForNewImage(); 6087 var selColor = $scope.colors.filter(opt => opt.selected === true)[0]; 6088 $scope.selectedProduct.ColorDesc = selColor.desc; 6089 } 6090 else 6091 $scope.selectedProduct.ColorDesc = undefined; 6092 }, 50); 6093 }); 6094 6095 $scope.$watch("selectedProduct.TeamCode", function (newVal, oldVal) { 6096 if (newVal == undefined && oldVal == undefined) return false; 6097 6098 $scope.selectedPill($scope.teamNames, newVal); 6099 6100 if (!$scope.inSingleVariant) { 6101 $scope.checkNullAttribute(newVal); 6102 6103 if (newVal != undefined) { 6104 $scope.processThisSelection('teamName'); 6105 } 6106 else $scope.resetOrderOption('teamName'); 6107 } 6108 $timeout(function () { 6109 if (newVal != undefined) { 6110 $scope.checkForNewImage(); 6111 var selTeam = $scope.teamNames.filter(opt => opt.selected === true)[0]; 6112 $scope.selectedProduct.TeamName = selTeam.desc; 6113 } 6114 else 6115 $scope.selectedProduct.TeamName = undefined; 6116 }, 50); 6117 });
6118 6119 $scope.$watch("selectedProduct.BatCode", function (newVal, oldVal) { 6120 if (newVal == undefined && oldVal == undefined) return false; 6121 6122 $scope.selectedPill($scope.bats, newVal); 6123 6124 if (!$scope.inSingleVariant) { 6125 $scope.checkNullAttribute(newVal); 6126 6127 if (newVal != undefined) { 6128 $scope.processThisSelection('bats'); 6129 } 6130 else $scope.resetOrderOption('bats'); 6131 } 6132 6133 $timeout(function () { 6134 if (newVal != undefined) { 6135 $scope.checkForNewImage(); 6136 } 6137 }, 50); 6138 }); 6139 6140 $scope.$watch("selectedProduct.ThrowCode", function (newVal, oldVal) { 6141 if (newVal == undefined && oldVal == undefined) return false; 6142 6143 $scope.selectedPill($scope.throws, newVal); 6144 6145 if (!$scope.inSingleVariant) { 6146 $scope.checkNullAttribute(newVal); 6147 6148 if (newVal != undefined) { 6149 $scope.processThisSelection('throws'); 6150 } 6151 else $scope.resetOrderOption('throws'); 6152 } 6153 6154 $timeout(function () { 6155 if (newVal != undefined) { 6156 $scope.checkForNewImage(); 6157 } 6158 }, 50); 6159 }); 6160 6161 $scope.$watch("selectedProduct.BatLengthCode", function (newVal, oldVal) { 6162 if (newVal == undefined && oldVal == undefined) return false; 6163 6164 $scope.selectedPill($scope.batLengths, newVal); 6165 6166 // reset bat weight if length is changed since they are dependent 6167 $scope.selectedProduct.BatWeightCode = undefined; 6168 6169 if (!$scope.inSingleVariant) { 6170 $scope.checkNullAttribute(newVal); 6171 6172 if (newVal != undefined) { 6173 $scope.processThisSelection('batLength'); 6174 } 6175 else $scope.resetOrderOption('batLength'); 6176 } 6177 }); 6178 6179 //************************************************************** 6180 // Checks, filters and populates variant specific data 6181 //*************************************************************** 6182 6183 $scope.atcReady = function () { 6184 if (!$scope.atcReadyFired) { 6185 //sticky atc 6186 if ($scope.data.IsQuickView != true && $window.quickviewJson === undefined) { 6187 $('#stickyAddToCart').headtacular(); //hooks up sticky ATC footer 6188 6189 const targetElement = document.querySelector('.cart-actions'); 6190 6191 // Options for the observer 6192 const options = { 6193 // null means the viewport is the root 6194 root: null, 6195 rootMargin: '0px', 6196 // 0.0 means the callback will fire as soon as 6197 // the first pixel of the target is out of view (or comes into view) 6198 threshold: 0.0 6199 }; 6200 6201 // The callback function that runs when the intersection changes 6202 const callback = (entries, observer) => { 6203 entries.forEach(entry => { 6204 // entry.isIntersecting is true if the element is in the viewport 6205 if (!entry.isIntersecting) { 6206 // The element has scrolled *out* of view 6207 //console.log('Element scrolled out of view:', entry.target); 6208 if (!$scope.data.ShowCustomClub) { 6209 $('#stickyAddToCart').show(); 6210 } 6211 6212 // Optional: Stop observing the element after it leaves view 6213 // observer.unobserve(entry.target); 6214 } else { 6215 // The element is in view (or has come back into view) 6216 //console.log('Element is in view:', entry.target); 6217 $('#stickyAddToCart').hide(); 6218 } 6219 }); 6220 }; 6221 6222 // Create the observer and start observing the target element 6223 const observer = new IntersectionObserver(callback, options); 6224 observer.observe(targetElement); 6225 } 6226 6227 //check variants 6228 6229 if ($scope.data.VariantSku && $scope.data.Variants) { 6230 6231 $scope.changeVariants = $scope.data.Variants.filter(v => v.Sku === $scope.data.VariantSku && v.SellAction !== 'X'); 6232 if ($scope.changeVariants.length == 1) { 6233 $scope.checkSingleVariant(); 6234 } 6235 } 6236 else { 6237 if ($scope.data.IsQuickView) $scope.flipDisabledAddToCartButton(true, false); 6238 6239 var sellableSkus = $scope.data.Variants.filter(v => v.SellAction !== 'X'); 6240 if (sellableSkus.length == 1) { 6241 $scope.changeVariants = sellableSkus; 6242 $timeout(function () { 6243 $scope.checkSingleVariant(); 6244 }, 50); 6245 } 6246 else { 6247 if ($scope.widths.length == 1) $scope.selectedProduct.WidthCode = $scope.widths[0].code; 6248 if ($scope.sizes.length == 1) $scope.selectedProduct.SizeCode = $scope.sizes[0].code; 6249 if ($scope.batLengths.length == 1) $scope.selectedProduct.BatLengthCode = $scope.batLengths[0].code; 6250 if ($scope.batWeights.length == 1) $scope.selectedProduct.BatWeightCode = $scope.batWeights[0].code; 6251 6252 if ($scope.throws.length == 1) $scope.selectedProduct.ThrowCode = $scope.throws[0].code; 6253 if ($scope.bats.length == 1) $scope.selectedProduct.BatCode = $scope.bats[0].code; 6254 6255 if ($scope.colors.length > 0) { 6256 $timeout(function () { 6257 if ($scope.colors.length == 1) 6258 $scope.selectedProduct.ColorCode = $scope.colors[0].code; 6259 else { 6260 var sortColors = $filter('orderBy')($scope.colors, 'desc'); 6261 $scope.selectedProduct.ColorCode = sortColors[0].code; 6262 //$scope.changeVariants = $scope.data.Variants.filter(variant => variant.ColorDescription === sortColors[0].code && variant.SellAction !== 'X'); 6263 //$scope.checkForNewImage(); 6264 } 6265 }, 50); 6266 } 6267 else if ($scope.teamNames.length > 0) { 6268 $timeout(function () { 6269 if ($scope.teamNames.length == 1) 6270 $scope.selectedProduct.TeamCode = $scope.teamNames[0].code; 6271 else { 6272 var sortTeams = $filter('orderBy')($scope.teamNames, 'desc'); 6273 $scope.selectedProduct.TeamCode = sortTeams[0].code; 6274 //$scope.changeVariants = $scope.data.Variants.filter(variant => variant.ClothingTeamCode === sortTeams[0].code && variant.SellAction !== 'X'); 6275 //$scope.checkForNewImage(); 6276 } 6277 }, 50); 6278 } 6279 } 6280 } 6281 } 6282 $scope.atcReadyFired = true; 6283 } 6284 6285 $scope.checkForNewImage = function () { 6286 if ($scope.data.Images.length > 1 && $scope.changeVariants.length > 0) { 6287 var imageIndex = $scope.changeVariants.findIndex(v => v.Images.length > 0 && v.Images[0].URL.length != 0); 6288 6289 if (imageIndex != -1) { 6290 var $quickView = $("div.moby-container.quickview.show"); 6291 if ($quickView.length) { 6292 $quickView.find("#main-image img").attr("src", $scope.changeVariants[imageIndex].Images[0].URL); 6293 $quickView.find("#main-image img").attr("alt", $scope.changeVariants[imageIndex].Images[0].AltText); 6294 $quickView.find('.mainImageCaption').text($scope.changeVariants[imageIndex].Images[0].AltText); 6295 } 6296 else { 6297 let $thumbsDiv = $("#product-thumbs"); 6298 let $slides = $thumbsDiv.find(".product-slide.product-image"); 6299 let $viewBtn = undefined; 6300 6301 let $countIndicators = $(".count-indicators"); 6302 let $dot = $countIndicators.find(".dot"); 6303 6304 for (let i = 0; i < $slides.length; i++) { 6305 var slickBtn = $($slides[i]).find("button").first(); 6306 if ($(slickBtn).find("img").first()[0].dataset.associatedcolorcode.includes($scope.changeVariants[imageIndex].Sku)) { 6307 $($slides[i]).show(); 6308 $($dot[i]).show(); 6309 $(slickBtn).attr("data-zoom-id", "main-image"); 6310 if ($viewBtn == undefined) { 6311 $viewBtn = $(slickBtn); 6312 } 6313 } 6314 else { 6315 $($slides[i]).hide(); 6316 $($dot[i]).hide(); 6317 $(slickBtn).removeAttr("data-zoom-id"); 6318 } 6319 } 6320 6321 if ($viewBtn != undefined) { 6322 let $imgScope = angular.element(document.getElementById('ImageGalleryController')).scope(); 6323 if ($imgScope != undefined) { 6324 6325 if ($imgScope.magicReady) { 6326 $imgScope.magicReady = false; 6327 $imgScope.selectedImage = $viewBtn; 6328 MagicZoom.refresh("main-image"); 6329 } 6330 else { 6331 $imgScope.swapImage($viewBtn, true); 6332 } 6333 } 6334 window.defaultThisImage = $viewBtn; 6335 $($thumbsDiv).scrollLeft(0); 6336 } 6337 } 6338 } 6339 } 6340 } 6341 6342 $scope.checkNullAttribute = function (newVal) { 6343 if (newVal == undefined) { 6344 $scope.variant = undefined;
6345 $scope.iNumberDisplay = undefined; 6346 $scope.skuLevelUpc = undefined; 6347 $scope.masterPrice = $scope.originalMasterPrice; 6348 $scope.data.HasBackorderMessage = false; 6349 if ($scope.data.Variants.length > 1) { 6350 $scope.data.StockMessage = ""; 6351 } 6352 $scope.sezzlePayment = $scope.data.InstallmentPriceSezzle; 6353 } 6354 } 6355 6356 $scope.selectedPill = function (options, newVal) { 6357 options.find(function (option) { 6358 option.selected = false; 6359 if (option.code === newVal) { 6360 option.selected = true; 6361 option.available = true; 6362 } 6363 }); 6364 } 6365 6366 $scope.resetOrderOption = function (attrName) { 6367 $scope.selectedOrder.find(function (sel) { 6368 if (sel.attribute == attrName) { 6369 sel.last = 9999; 6370 } 6371 }); 6372 } 6373 6374 $scope.processThisSelection = function (attrName) { 6375 $scope.selectedOrder.find(function (sel) { 6376 if (sel.attribute == attrName) { 6377 $scope.selectedCount++; 6378 sel.last = $scope.selectedCount; 6379 } 6380 }); 6381 6382 $scope.resetColor = false; 6383 $scope.resetTeam = false; 6384 $scope.resetSize = false; 6385 $scope.resetWidth = false; 6386 $scope.resetBatHand = false; 6387 $scope.resetThrowHand = false; 6388 $scope.resetBatLength = false; 6389 6390 // check if selection was valid 6391 let thisSelection = $scope.data.Variants.filter(variant => variant.SellAction !== 'X'); 6392 6393 let sortedSelections = $scope.selectedOrder.sort((a, b) => a.last - b.last); 6394 sortedSelections.forEach(function (sel) { 6395 if (sel.attribute != attrName && sel.last != 9999) { 6396 if (sel.attribute == 'color') 6397 thisSelection = thisSelection.filter(variant => variant.ColorDescription === $scope.selectedProduct.ColorCode); 6398 6399 else if (sel.attribute == 'teamName') 6400 thisSelection = thisSelection.filter(variant => variant.ClothingTeamCode === $scope.selectedProduct.TeamCode); 6401 6402 else if (sel.attribute == 'size') 6403 thisSelection = thisSelection.filter(variant => variant.SizeCode === $scope.selectedProduct.SizeCode); 6404 6405 else if (sel.attribute == 'shoeWidth') 6406 thisSelection = thisSelection.filter(variant => variant.ShoeWidth === $scope.selectedProduct.WidthCode); 6407 6408 else if (sel.attribute == 'bats') 6409 thisSelection = thisSelection.filter(variant => variant.BatHand === $scope.selectedProduct.BatCode); 6410 6411 else if (sel.attribute == 'throws') 6412 thisSelection = thisSelection.filter(variant => variant.GloveThrowHand === $scope.selectedProduct.ThrowCode); 6413 6414 else if (sel.attribute == 'batLength') 6415 thisSelection = thisSelection.filter(variant => variant.BatLength === $scope.selectedProduct.BatLengthCode); 6416 } 6417 }); 6418 6419 if (attrName == 'color') 6420 thisSelection = thisSelection.filter(variant => variant.ColorDescription === $scope.selectedProduct.ColorCode); 6421 6422 else if (attrName == 'teamName') 6423 thisSelection = thisSelection.filter(variant => variant.ClothingTeamCode === $scope.selectedProduct.TeamCode); 6424 6425 else if (attrName == 'size') 6426 thisSelection = thisSelection.filter(variant => variant.SizeCode === $scope.selectedProduct.SizeCode); 6427 6428 else if (attrName == 'shoeWidth') 6429 thisSelection = thisSelection.filter(variant => variant.ShoeWidth === $scope.selectedProduct.WidthCode); 6430 6431 else if (attrName == 'bats') 6432 thisSelection = thisSelection.filter(variant => variant.BatHand === $scope.selectedProduct.BatCode); 6433 6434 else if (attrName == 'throws') 6435 thisSelection = thisSelection.filter(variant => variant.GloveThrowHand === $scope.selectedProduct.ThrowCode); 6436 6437 else if (attrName == 'batLength') 6438 thisSelection = thisSelection.filter(variant => variant.BatLength === $scope.selectedProduct.BatLengthCode); 6439 6440 if (thisSelection.length == 0) //not valid, clear options 6441 { 6442 $scope.selectedOrder.forEach(function (sel) { 6443 if (sel.attribute != attrName && sel.last != 9999) { 6444 sel.last = 9999; 6445 if (sel.attribute == 'color') $scope.resetColor = true; 6446 else if (sel.attribute == 'teamName') $scope.resetTeam = true; 6447 else if (sel.attribute == 'size') $scope.resetSize = true; 6448 else if (sel.attribute == 'shoeWidth') $scope.resetWidth = true; 6449 else if (sel.attribute == 'bats') $scope.resetBatHand = true; 6450 else if (sel.attribute == 'throws') $scope.resetThrowHand = true; 6451 else if (sel.attribute == 'batLength') $scope.resetBatLength = true; 6452 } 6453 }); 6454 } 6455 6456 // reset all valid selections 6457 6458 $scope.changeVariants = $scope.data.Variants.filter(variant => variant.SellAction !== 'X'); 6459 6460 sortedSelections = $scope.selectedOrder.sort((a, b) => a.priority - b.priority); 6461 6462 sortedSelections.find(function (sel) { 6463 if (sel.last != 9999 && $scope.changeVariants.length > 1) { 6464 if (sel.attribute == 'color') 6465 $scope.changeVariants = $scope.changeVariants.filter(variant => variant.ColorDescription === $scope.selectedProduct.ColorCode); 6466 6467 else if (sel.attribute == 'teamName') 6468 $scope.changeVariants = $scope.changeVariants.filter(variant => variant.ClothingTeamCode === $scope.selectedProduct.TeamCode); 6469 6470 else if (sel.attribute == 'size') 6471 $scope.changeVariants = $scope.changeVariants.filter(variant => variant.SizeCode === $scope.selectedProduct.SizeCode); 6472 6473 else if (sel.attribute == 'shoeWidth') 6474 $scope.changeVariants = $scope.changeVariants.filter(variant => variant.ShoeWidth === $scope.selectedProduct.WidthCode); 6475 6476 else if (sel.attribute == 'bats') 6477 $scope.changeVariants = $scope.changeVariants.filter(variant => variant.BatHand === $scope.selectedProduct.BatCode); 6478 6479 else if (sel.attribute == 'throws') 6480 $scope.changeVariants = $scope.changeVariants.filter(variant => variant.GloveThrowHand === $scope.selectedProduct.ThrowCode); 6481 6482 else if (sel.attribute == 'batLength') 6483 $scope.changeVariants = $scope.changeVariants.filter(variant => variant.BatLength === $scope.selectedProduct.BatLengthCode); 6484 6485 $scope.selectedOrder.find(function (nestedSel) { 6486 if (nestedSel.attribute != sel.attribute && nestedSel.priority > sel.priority) { 6487 if (nestedSel.attribute == 'color') 6488 $scope.checkFilteredColors(); 6489 6490 else if (nestedSel.attribute == 'teamName') 6491 $scope.checkFilteredTeams(); 6492 6493 else if (nestedSel.attribute == 'size') 6494 $scope.checkFilteredSizes(); 6495 6496 else if (nestedSel.attribute == 'shoeWidth') 6497 $scope.checkFilteredWidths(); 6498 6499 else if (nestedSel.attribute == 'bats') 6500 $scope.checkFilteredBats(); 6501 6502 else if (nestedSel.attribute == 'throws') 6503 $scope.checkFilteredThrows(); 6504 6505 else if (nestedSel.attribute == 'batLength') 6506 $scope.checkFilteredBatLengths(); 6507 6508 } 6509 }); 6510 } 6511 }); 6512 6513 let allSet = true; 6514 sortedSelections.find(function (sel) { 6515 if (sel.attribute != attrName && sel.last == 9999) { 6516 allSet = false; 6517 6518 if (sel.attribute == 'color') 6519 $scope.checkFilteredColors(); 6520 6521 else if (sel.attribute == 'teamName') 6522 $scope.checkFilteredTeams(); 6523 6524 else if (sel.attribute == 'size') 6525 $scope.checkFilteredSizes(); 6526 6527 else if (sel.attribute == 'shoeWidth') 6528 $scope.checkFilteredWidths(); 6529 6530 else if (sel.attribute == 'bats') 6531 $scope.checkFilteredBats(); 6532 6533 else if (sel.attribute == 'throws') 6534 $scope.checkFilteredThrows(); 6535 6536 else if (sel.attribute == 'batLength') 6537 $scope.checkFilteredBatLengths(); 6538 6539 } 6540 }); 6541 6542 if (allSet) 6543 $scope.checkSingleVariant(); 6544 6545 if ($scope.resetColor) $scope.selectedProduct.ColorCode = undefined; 6546 if ($scope.resetTeam) $scope.selectedProduct.TeamCode = undefined; 6547 if ($scope.resetSize) $scope.selectedProduct.SizeCode = undefined; 6548 if ($scope.resetWidth) $scope.selectedProduct.WidthCode = undefined; 6549 if ($scope.resetBatHand) $scope.selectedProduct.BatCode = undefined; 6550 if ($scope.resetThrowHand) $scope.selectedProduct.ThrowCode = undefined; 6551 if ($scope.resetBatLength) $scope.selectedProduct.BatLengthCode = undefined; 6552 } 6553 6554 $scope.checkFilteredColors = function () { 6555 if ($scope.colors.length > 1) { 6556 $scope.colors.find(function (option) { 6557 var foundIt = false; 6558 $scope.changeVariants.find(function (variant) { 6559 if (variant.ColorDescription === option.code) { 6560 foundIt = true; 6561 } 6562 }); 6563 option.available = foundIt; 6564 }); 6565 } 6566 } 6567 6568 $scope.checkFilteredTeams = function () { 6569 if ($scope.teamNames.length > 1) { 6570 $scope.teamNames.find(function (option) { 6571 var foundIt = false; 6572 $scope.changeVariants.find(function (variant) { 6573 if (variant.ClothingTeamCode === option.code) { 6574 foundIt = true; 6575 } 6576 }); 6577 option.available = foundIt; 6578 }); 6579 } 6580 } 6581 6582 $scope.checkFilteredSizes = function () { 6583 if ($scope.sizes.length > 1) { 6584 $scope.sizes.find(function (option) { 6585 var foundIt = false; 6586 $scope.changeVariants.find(function (variant) { 6587 if (variant.SizeCode === option.code) { 6588 foundIt = true; 6589 } 6590 }); 6591 option.available = foundIt; 6592 }); 6593 } 6594 } 6595 6596 $scope.checkFilteredWidths = function () { 6597 if ($scope.widths.length > 1) { 6598 $scope.widths.find(function (option) { 6599 var foundIt = false; 6600 $scope.changeVariants.find(function (variant) { 6601 if (variant.ShoeWidth === option.code) { 6602 foundIt = true; 6603 } 6604 }); 6605 option.available = foundIt; 6606 }); 6607 } 6608 } 6609 6610 $scope.checkFilteredBats = function () { 6611 if ($scope.bats.length > 1) { 6612 $scope.bats.find(function (option) { 6613 var foundIt = false; 6614 $scope.changeVariants.find(function (variant) { 6615 if (variant.BatHand === option.code) { 6616 foundIt = true; 6617 } 6618 }); 6619 option.available = foundIt; 6620 }); 6621 } 6622 } 6623 6624 $scope.checkFilteredThrows = function () { 6625 if ($scope.throws.length > 1) { 6626 $scope.throws.find(function (option) { 6627 var foundIt = false; 6628 $scope.changeVariants.find(function (variant) { 6629 if (variant.GloveThrowHand === option.code) { 6630 foundIt = true; 6631 } 6632 }); 6633 option.available = foundIt; 6634 }); 6635 } 6636 } 6637 6638 $scope.checkFilteredBatLengths = function () { 6639 if ($scope.batLengths.length > 1) { 6640 $scope.batLengths.find(function (option) { 6641 var foundIt = false; 6642 $scope.changeVariants.find(function (variant) { 6643 if (variant.BatLength === option.code) { 6644 foundIt = true; 6645 } 6646 }); 6647 option.available = foundIt; 6648 }); 6649 } 6650 } 6651 6652 $scope.checkSingleVariant = function () { 6653 if ($scope.changeVariants.length == 1) { 6654 $scope.inSingleVariant = true; 6655 6656 if ($scope.colors.length > 0 && ($scope.selectedProduct.ColorCode == undefined || $scope.resetColor)) { 6657 $scope.selectedProduct.ColorCode = $scope.changeVariants[0].ColorDescription; 6658 $scope.resetColor = false; 6659 } 6660 6661 if ($scope.teamNames.length > 0 && ($scope.selectedProduct.TeamCode == undefined || $scope.resetTeam)) { 6662 $scope.selectedProduct.TeamCode = $scope.changeVariants[0].ClothingTeamCode; 6663 $scope.resetTeam = false; 6664 } 6665 6666 if ($scope.sizes.length > 0 && ($scope.selectedProduct.SizeCode == undefined || $scope.resetSize)) { 6667 $scope.selectedProduct.SizeCode = $scope.changeVariants[0].SizeCode; 6668 $scope.resetSize = false; 6669 } 6670 6671 if ($scope.widths.length > 0 && ($scope.selectedProduct.WidthCode == undefined || $scope.resetWidth)) { 6672 $scope.selectedProduct.WidthCode = $scope.changeVariants[0].ShoeWidth; 6673 $scope.resetWidth = false; 6674 } 6675 6676 if ($scope.bats.length > 0 && ($scope.selectedProduct.BatCode == undefined || $scope.resetBatHand)) { 6677 $scope.selectedProduct.BatCode = $scope.changeVariants[0].BatHand; 6678 $scope.resetBatHand = false; 6679 } 6680 6681 if ($scope.throws.length > 0 && ($scope.selectedProduct.ThrowCode == undefined || $scope.resetThrowHand)) { 6682 $scope.selectedProduct.ThrowCode = $scope.changeVariants[0].GloveThrowHand; 6683 $scope.resetThrowHand = false; 6684 } 6685 6686 if ($scope.batLengths.length > 0 && ($scope.selectedProduct.BatLengthCode == undefined || $scope.resetBatLength)) { 6687 $scope.selectedProduct.BatLengthCode = $scope.changeVariants[0].BatLength; 6688 $scope.resetBatLength = false; 6689 } 6690 6691 if ($scope.batWeights.length > 0 && ($scope.selectedProduct.BatWeightCode == undefined || $scope.resetBatWeight)) { 6692 $scope.selectedProduct.BatWeightCode = $scope.changeVariants[0].BatWeightOunces; 6693 $scope.resetBatWeight = false; 6694 } 6695 6696 $timeout(function () { 6697 $scope.populateVariantData($scope.changeVariants[0]); 6698 6699 $scope.inSingleVariant = false; 6700 }, 50); 6701 } 6702 } 6703 6704 $scope.populateVariantData = function (variant) { 6705 $scope.variant = variant; 6706 if (variant.RegularPriceDisplayLevel === 3) { 6707 $scope.masterPrice = "Add To Cart To See Price"; 6708 } else if (variant.RegularPriceDisplayLevel === 1) { 6709 $scope.masterPrice = variant.Price; 6710 } else { 6711 $scope.masterPrice = variant.Price; 6712 } 6713 6714 if (/[,\$]/.test($scope.masterPrice)) { 6715 var newSezzlePrice = $scope.masterPrice.replace("$", "").replace(",", ""); 6716 $scope.sezzlePayment = (newSezzlePrice / 5).toFixed(2).toString(); 6717 } 6718 else {
6719 $scope.sezzlePayment = $scope.masterPrice; 6720 } 6721 6722 if ($scope.data.CompanionProducts != null && $scope.data.CompanionProducts.length > 0) { 6723 $timeout(function () { 6724 $scope.parentOptionsComplete = true; // trigger showing companion, mostly for clubs 6725 }, 500); 6726 } 6727 6728 $scope.iNumberDisplay = variant.Sku; 6729 $scope.skuLevelUpc = variant.Upc; 6730 6731 if (variant.Clearance === true && variant.WasPriceDisplay.length > 0) { 6732 $scope.data.ShowClearanceFlag = true; 6733 $scope.data.WasPriceDisplay = variant.WasPriceDisplay; 6734 } else if (variant.ShowSaleFlag === true && variant.WasPriceDisplay.length > 0) { 6735 $scope.data.WasPriceDisplay = variant.WasPriceDisplay; 6736 $scope.ShowSaleFlag = true; 6737 } else { // no sale prices 6738 $scope.data.ShowClearanceFlag = $scope.data.originalClearanceValue; 6739 $scope.data.ShowSaleFlag = false; 6740 $scope.WasPriceDisplay = $scope.originalWasPriceDisplay; 6741 } 6742 6743 if (variant.SellAction === 'S') { 6744 $scope.data.HasBackorderMessage = false; 6745 $scope.data.StockMessage = "In Stock"; 6746 $scope.BackOrderCreditFlag = false; 6747 6748 if (variant.IsDropShip === true && variant.InventoryMessage.length > 0) { 6749 $scope.data.StockMessage = variant.InventoryMessage; 6750 } else if (variant.IsDropShip === true && !variant.InventoryMessage.length) { 6751 $scope.data.StockMessage = "This product ships directly from our vendors. Estimated ship date: Unknown."; 6752 } 6753 } else if (variant.SellAction === 'B') { 6754 $scope.data.HasBackorderMessage = true; 6755 $scope.BackOrderCreditFlag = false; 6756 6757 if (variant.IsPresale) { 6758 $scope.data.StockMessage = variant.InventoryMessage; 6759 } else { 6760 if ((variant.ExpectedDate != null || variant.ExpectedDate != '') && variant.IsDropShip === true) { 6761 $scope.data.StockMessage = "This product ships directly from our vendors. Estimated ship date: " + new moment(variant.ExpectedDate).format("MM/DD/YYYY"); 6762 $scope.BackOrderCreditFlag = false; 6763 } else if ((variant.ExpectedDate === null || variant.ExpectedDate === '') && variant.IsDropShip === true) { 6764 $scope.data.StockMessage = "This product ships directly from our vendors. Estimated ship date: Unknown."; 6765 $scope.BackOrderCreditFlag = false; 6766 } else if (variant.InventoryMessage.length > 0) { 6767 $scope.BackOrderCreditFlag = false; 6768 $scope.data.StockMessage = variant.InventoryMessage; 6769 } 6770 } 6771 } else if (variant.SellAction === 'N') { 6772 $scope.data.HasBackorderMessage = true; 6773 $scope.data.StockMessage = "Item currently unavailable for sale."; 6774 } 6775 } 6776 6777 $scope.populateGiftCards = function () {
6778 $scope.data.Variants.forEach(function (variant) { 6779 if (variant.SellAction !== "X") { // this should never be the case for gift cards but 6780 var gc = $scope.giftCards.findIndex(x => x.Price == variant.Price); 6781 if (gc <= -1) { 6782 $scope.giftCards.push({ 6783 desc: variant.Price, 6784 code: variant.Sku, 6785 sort: $scope.getSizeSort(variant.Price.replace("$", "")), 6786 available: true, 6787 selected: false 6788 }) 6789 } 6790 } 6791 }) 6792 } 6793 6794 $scope.populateSizesAndColors = function () { 6795 $scope.data.Variants.forEach(function (variant) { 6796 if (variant.SellAction !== 'X') { 6797 6798 if (variant.ShoeWidth != null) { 6799 var t = $scope.widths.findIndex(x => x.desc === variant.ShoeWidth); 6800 if (t <= -1 && variant.ShoeWidth) 6801 $scope.widths.push({ 6802 code: variant.ShoeWidth, 6803 desc: variant.ShoeWidth, 6804 available: true, 6805 selected: false 6806 }); 6807 } 6808 6809 if (variant.GloveThrowHand != null) { 6810 var t = $scope.throws.findIndex(x => x.code === variant.GloveThrowHand); 6811 if (t <= -1) { 6812 $scope.throws.push({ 6813 code: variant.GloveThrowHand, 6814 desc: variant.GloveThrowHand, 6815 available: true, 6816 selected: false 6817 }); 6818 } 6819 } 6820 6821 if (variant.SizeCode != null) { 6822 var x = $scope.sizes.findIndex(x => x.code === variant.SizeCode); 6823 if (x <= -1 && variant.SizeDescription) { 6824 if (!variant.ColorDescription && !variant.ClothingTeamName) { 6825 $scope.sizes.push({ 6826 code: variant.SizeCode, 6827 desc: variant.SizeDescription + (variant.SaleType ? variant.SaleType === "C" ? " - Clearance!" : variant.SaleType === "S" ? " - On Sale!" : "" : ""), // 3 prices now...
6828 sort: $scope.getSizeSort(variant.SizeDescription), 6829 available: true, 6830 selected: false 6831 }); 6832 } else { 6833 $scope.sizes.push({ 6834 code: variant.SizeCode, 6835 desc: variant.SizeDescription, 6836 sort: $scope.getSizeSort(variant.SizeDescription), 6837 available: true, 6838 selected: false 6839 }); 6840 } 6841 } 6842 } 6843 6844 if (variant.ClothingTeamCode && variant.ClothingTeamName) { // colorado-rockies, etc 6845 var team = $scope.teamNames.findIndex(x => x.code == variant.ClothingTeamCode); 6846 if (team <= -1) { 6847 $scope.teamNames.push({ 6848 desc: variant.ClothingTeamName + (variant.SaleType ? variant.SaleType === "C" ? " - Clearance!" : variant.SaleType === "S" ? " - On Sale!" : "" : ""), 6849 code: variant.ClothingTeamCode, 6850 available: true, 6851 selected: false, 6852 imageUrl: variant.Images.length > 0 ? variant.Images[0].URL.replace("/l/", "/s/") : "", 6853 imageText: variant.Images.length > 0 ? variant.Images[0].AltText : "", 6854 }) 6855 } 6856 else { 6857 if ($scope.teamNames[team].imageUrl.length == 0 && variant.Images.length > 0) { 6858 $scope.teamNames[team].imageUrl = variant.Images[0].URL.replace("/l/", "/s/"); 6859 $scope.teamNames[team].imageText = variant.Images[0].AltText; 6860 } 6861 } 6862 } 6863 6864 if (variant.ColorDescription != null && variant.ClothingTeamCode == null) { 6865 var y = $scope.colors.findIndex(x => x.code === variant.ColorDescription); 6866 if (y <= -1 && variant.ColorDescription && $scope.teamNames.length == 0) { 6867 if ($scope.data.SizeColorsOnSale && variant.DiscountedPrice > 0) { 6868 $scope.colors.push({ 6869 code: variant.ColorDescription, 6870 desc: variant.ColorDescription + (variant.SaleType ? variant.SaleType === "C" ? " - Clearance!" : variant.SaleType === "S" ? " - On Sale!" : "" : ""),// 3 prices now...
6871 available: true, 6872 selected: false, 6873 imageUrl: variant.Images.length > 0 ? variant.Images[0].URL.replace("/l/", "/s/") : "", 6874 imageText: variant.Images.length > 0 ? variant.Images[0].AltText : "", 6875 }); 6876 } else { 6877 $scope.colors.push({ 6878 code: variant.ColorDescription, 6879 desc: variant.ColorDescription, 6880 available: true, 6881 selected: false, 6882 imageUrl: variant.Images.length > 0 ? variant.Images[0].URL.replace("/l/", "/s/") : "", 6883 imageText: variant.Images.length > 0 ? variant.Images[0].AltText : "", 6884 }); 6885 } 6886 } 6887 else { 6888 if ($scope.colors[y].imageUrl.length == 0 && variant.Images.length > 0) { 6889 $scope.colors[y].imageUrl = variant.Images[0].URL.replace("/l/", "/s/"); 6890 $scope.colors[y].imageText = variant.Images[0].AltText; 6891 } 6892 6893 } 6894 } 6895 6896 if (variant.BatHand) { 6897 var b = $scope.bats.findIndex(x => x.code === variant.BatHand); 6898 if (b <= -1) { 6899 $scope.bats.push({ 6900 code: variant.BatHand, 6901 desc: variant.BatHand, 6902 available: true, 6903 selected: false 6904 }); 6905 } 6906 } 6907 6908 if (variant.BatLength) { 6909 var l = $scope.batLengths.findIndex(x => x.code === variant.BatLength) 6910 if (l <= -1) { 6911 $scope.batLengths.push({ 6912 code: variant.BatLength, 6913 desc: variant.BatLength, 6914 sort: $scope.getSizeSort(variant.BatLength), 6915 available: true, 6916 selected: false 6917 }); 6918 } 6919 } 6920 6921 if (variant.BatWeightOunces) { 6922 var l = $scope.batWeights.findIndex(x => x.code === variant.BatWeightOunces) 6923 if (l <= -1) { 6924 $scope.batWeights.push({ 6925 code: variant.BatWeightOunces, 6926 desc: variant.BatWeightOunces, 6927 sort: $scope.getSizeSort(variant.BatWeightOunces), 6928 available: true, 6929 selected: false 6930 }); 6931 } 6932 } 6933 } 6934 }); 6935 6936 if ($scope.colors.length > 1) { 6937 $scope.selectedOrder.push({ 6938 attribute: 'color', 6939 last: 9999, 6940 priority: 0 6941 }); 6942 } 6943 6944 if ($scope.teamNames.length > 1) { 6945 $scope.selectedOrder.push({ 6946 attribute: 'teamName', 6947 last: 9999, 6948 priority: 0 6949 }); 6950 } 6951 6952 if ($scope.sizes.length > 1) { 6953 $scope.selectedOrder.push({ 6954 attribute: 'size', 6955 last: 9999, 6956 priority: 3 6957 }); 6958 } 6959 6960 if ($scope.widths.length > 1) { 6961 $scope.selectedOrder.push({ 6962 attribute: 'shoeWidth', 6963 last: 9999, 6964 priority: 4 6965 }); 6966 } 6967 6968 if ($scope.bats.length > 1) { 6969 $scope.selectedOrder.push({ 6970 attribute: 'bats', 6971 last: 9999, 6972 priority: 1 6973 }); 6974 } 6975 6976 if ($scope.throws.length > 1) { 6977 $scope.selectedOrder.push({ 6978 attribute: 'throws', 6979 last: 9999, 6980 priority: 1 6981 }); 6982 } 6983 6984 if ($scope.batLengths.length > 1) { 6985 $scope.selectedOrder.push({ 6986 attribute: 'batLength', 6987 last: 9999, 6988 priority: 1 6989 }); 6990 } 6991 } 6992 6993 $scope.openSizeChart = function () { 6994 if ($scope.data.BrandSizeCharts.BrandSizeChartList.length > 0) { 6995 $scope.modal = { 6996 customCssClass: "brandSizeChart", 6997 title: $scope.data.BrandSizeCharts.Brand + " Brand Size Charts", 6998 templateUrl: "/templates/shared/brand-size-charts-modal.html", 6999 clickOutsideToClose: false 7000 } 7001 } else { 7002 $scope.modal = { 7003 customCssClass: "genericSizeChart", 7004 title: "Size Chart", 7005 templateUrl: "/templates/shared/generic-size-chart.html", 7006 clickOutsideToClose: false 7007 } 7008 } 7009 7010 $mdDialog.show($mdDialog.modal({ 7011 scope: $scope, 7012 onRemoving: function () { 7013 $("#size-chart").focus(); 7014 } 7015 })); 7016 } 7017 7018 $scope.showModalSizeChart = function (chartUrl) { 7019 $scope.data.modalSizeChart = chartUrl; 7020 } 7021 7022 $scope.customizeChange = function() { 7023 $form.find('#hdnPersonalize').val($scope.data.Personalize); 7024 } 7025 7026 $scope.closeDialog = function() { 7027 $scope.data.modalSizeChart = ""; 7028 $mdDialog.hide(); 7029 } 7030 7031 $scope.closePersonalization = function () { 7032 $mdDialog.hide(); 7033 $scope.Personalization = false; 7034 } 7035 7036 $scope.ValidateOptions = () => { 7037 if ($scope.data.Variants.length < 1) { 7038 return true; 7039 }; 7040 7041 if ($scope.variant == undefined) { 7042 return false; 7043 } 7044 7045 var giftCardForm = $form.find("#selectedProductGiftCardCode"); 7046 var gcEmailElseForm = $form.find("#GiftCardRecipientController"); 7047 7048 if (giftCardForm.length && $scope.selectedProduct.GiftCardCode === undefined) { 7049 giftCardForm[0].scrollIntoView(false); 7050 giftCardForm.focus(); 7051 giftCardForm.append(`<p class='jqv-error'>* This option must be selected. </p>`); 7052 return false; 7053 } else { 7054 giftCardForm.find("p, .jqv-error").remove(); 7055 } 7056 7057 if ($scope.selectedProduct.GiftCardCode != undefined && $scope.data.ID == 26380) { 7058 // validate email to someone else form 7059 let inputs = gcEmailElseForm.find('input'); 7060 for (let i = 0; i < inputs.length; i++) { 7061 // fromname, toname, recipientemail, message
7062 var isValid = inputs[i].checkValidity(); 7063 if (isValid === false) { 7064 inputs[i].nextSibling.innerHTML = `<p class='jqv-error'>* This option must be filled in. </p>`; 7065 inputs[i].focus(); 7066 return false; 7067 } else { 7068 inputs[i].nextSibling.innerHTML = "" 7069 } 7070 } 7071 } 7072 } 7073 7074 $scope.CompanionCheck = () => { 7075 var scope = angular.element($form.find('#companion-products')).scope(); 7076 let companions = []; 7077 scope.vm.forEach(function (product) { 7078 if (product.addToCart) { 7079 let companion = {}; 7080 companion.Quantity = parseInt($form.find("#quantity").val()); 7081 companion.AdId = product.AdId; 7082 companion.ID = product.ID; 7083 companion.PromoCode = product.PromoCode; 7084 companion.Sku = product.Sku; 7085 companions.push(companion); 7086 } 7087 }); 7088 return companions; 7089 }; 7090 7091 $scope.CheckShipping = function (formData) { 7092 if ($scope.data.ShippingInfo === null || $scope.data.ShippingInfo === undefined) { 7093 $("#product-form").find(".jqv-error").remove(); 7094 var element = $("#product-form").find("#freightZip").parent().append(`<p class='jqv-error'>* This option must be selected. </p>`); 7095 return formData; 7096 } else { 7097 formData.FreightAmount = $scope.data.ShippingInfo.amount; //FrieghtLookupController.js 7098 formData.FreightZip = $scope.data.ShippingInfo.zip; 7099 formData.FrontDoor = $scope.data.ShippingInfo.frontDoorService; 7100 formData.Liftgate = $scope.data.ShippingInfo.liftGateService; 7101 } 7102 return formData; 7103 }; 7104 7105 $scope.addToCartPDP = function (id, promo) { 7106 $scope.flipDisabledAddToCartButton(true, true); 7107 if ($scope.data.Variants.length > 0) { 7108 let valid = $scope.ValidateOptions(); 7109 7110 if (valid === false) { 7111 $scope.flipDisabledAddToCartButton(false, true); 7112 7113 return false; 7114 } 7115 } 7116 $scope.formData = AjaxJsonPostWrapper.getFormData($form); 7117 if ($scope.variant && !$scope.data.IsGiftCard) { 7118 $scope.formData.ID = $scope.variant.Sku.replace("I", ""); // add 'I' later 7119 } 7120 else if ($scope.variant && $scope.data.IsGiftCard) { 7121 let scope = angular.element(document.getElementById('GiftCardRecipientController')).scope(); 7122 if (scope != undefined) { 7123 var giftCardRecipient = { 7124 FromName: scope.gcRecipient.fromName, 7125 ToName: scope.gcRecipient.toName, 7126 RecipientEmail: scope.gcRecipient.recipientEmail, 7127 GiftMessage: scope.gcRecipient.message, 7128 EmailToSelf: scope.gcRecipient.emailToMe 7129 }; 7130 $scope.formData.GCRecipient = giftCardRecipient; 7131 } 7132 } 7133 else if (!$scope.variant && $scope.data.Variants.length <= 1) { 7134 // grab the main sku 7135 if ($scope.data.Variants.length == 1) { 7136 $scope.formData.ID = $scope.data.Variants[0].Sku.replace("I", ""); 7137 } else { 7138 $scope.formData.ID = $scope.data.Sku.replace("I", ""); 7139 } 7140 } 7141 7142 $scope.formData.GloveBreakInService = $scope.data.GloveBreakInService; 7143 7144 if ($scope.selectedProduct.BMSMQuantity !== undefined) { 7145 $scope.formData.quantity = $scope.selectedProduct.BMSMQuantity.toString(); 7146 } 7147 7148 if ($scope.data.CompanionProducts.length) { 7149 if ($scope.data.IsQuickView === false) { 7150 $scope.formData.Companions = $scope.CompanionCheck(); 7151 if ($scope.formData.Companions.length > 0) { $scope.formData.AddRecommendedItem = true; } 7152 } 7153 } 7154 7155 if ($scope.selectedProduct.GiftCardCode) { 7156 $scope.formData.Sku = $scope.selectedProduct.GiftCardCode; 7157 } 7158 7159 return $scope.finishAddingToCart($scope.formData); 7160 } 7161 7162 $scope.getSizeSort = function (size) { 7163 let sortSize = size.toUpperCase();
7164 if (sortSize.includes('T-BALL')) return 0.5; 7165 if (sortSize.includes('M/L')) return 2.5; 7166 if (sortSize.includes('L/XL')) return 3.5; //L/XL (7 1/8 - 7 3/4) 7167 switch (sortSize) { 7168 case "XS": 7169 case "X-SMALL": 7170 return 0.5; 7171 break; 7172 case "S": 7173 case "SMALL": 7174 return 1.0; 7175 break; 7176 case "SMALL/MEDIUM": 7177 case "S TO M": 7178 case "S/M": 7179 return 1.5; 7180 break; 7181 case "M": 7182 case "MEDIUM": 7183 return 2.0; 7184 break; 7185 case "MEDIUM/LARGE": 7186 case "M TO L": 7187 case "M/L": 7188 return 2.5; 7189 break; 7190 case "L": 7191 case "LARGE": 7192 return 3.0; 7193 break; 7194 case "LARGE/X-LARGE": 7195 case "L TO XL": 7196 case "L/XL": 7197 return 3.5; 7198 break; 7199 case "XL": 7200 case "X-LARGE": 7201 return 4.0; 7202 break; 7203 case "2XL": 7204 case "XX-LARGE": 7205 return 5.0; 7206 break; 7207 case "3XL": 7208 case "XXX-LARGE": 7209 return 6.0; 7210 break; 7211 default: 7212 if ((parseInt(size) == NaN) && (parseFloat(size) == NaN)) 7213 return size; 7214 else { 7215 return +size; 7216 } 7217 } 7218 } 7219 7220 $scope.flipDisabledAddToCartButton = function (disableATC, inATC) { 7221 if ($scope.data.IsQuickView) { 7222 $(".moby-container #quickview-form #btnAddItemToCart").prop("disabled", disableATC); 7223 } 7224 else { 7225 $("#btnAddItemToCart").prop("disabled", disableATC); 7226 $("#stickyAddToCart .add-to-cart .btn-cart").prop("disabled", disableATC); 7227 7228 if (disableATC && !inATC) { 7229 $("#stickyAddToCart .add-to-cart .btn-cart").hide(); 7230 $("#stickyAddToCart .add-to-cart .select-options-btn").show(); 7231 } 7232 else { 7233 $("#stickyAddToCart .add-to-cart .btn-cart").show(); 7234 $("#stickyAddToCart .add-to-cart .select-options-btn").hide(); 7235 } 7236 } 7237 } 7238 7239 function populateTealiumScript(script) { 7240 var div = $('#tealiumAjax'); 7241 if (typeof div !== 'undefined') { 7242 div.empty(); 7243 div.append(script); 7244 } 7245 } 7246 7247 function populateMonetateAjaxScript(pageScript, cartScript) { 7248 var fullMonetateScript = ""; 7249 if (pageScript && pageScript.length) { 7250 fullMonetateScript = pageScript; 7251 } 7252 7253 if (cartScript && cartScript.length) { 7254 fullMonetateScript = fullMonetateScript + cartScript; 7255 window.monetateCartScript = cartScript; 7256 } 7257 7258 if (fullMonetateScript && fullMonetateScript.length) { 7259 7260 fullMonetateScript = fullMonetateScript + "<script id=\"monetateTrackData\" type=\"text/javascript\"> window.monetateQ.push([\"trackData\"]);<\/script>"; 7261 var monetateATC = $('#monetateAjax'); 7262 monetateATC.empty(); 7263 if (monetateATC.length) { 7264 monetateATC.append(fullMonetateScript); 7265 } 7266 } 7267 } 7268 7269 $scope.finishAddingToCart = function (formData, freeGiftBool) { 7270 return _productService.addToCart(formData).then( 7271 function (response) { 7272 if (response.tealium && response.tealium.length) { 7273 populateTealiumScript(response.tealium); 7274 } 7275 if ((response.monetatePageScript && response.monetatePageScript.length) || (response.monetateCartScript && response.monetateCartScript.length)) { 7276 populateMonetateAjaxScript(response.monetatePageScript, response.monetateCartScript); 7277 } 7278 if (response.personalizeGiftCard && freeGiftBool !== true) { // this should only be true if they submit from free gift modal, true keeps from re-popping 7279 //let scope = angular.element(document.getElementById('GiftCardRecipientController')).scope(); 7280 //if (scope != undefined) { 7281 // scope.triggerModal(response.personalizeGiftCard.EntryId, response.personalizeGiftCard.GiftCardType != null ? response.personalizeGiftCard.GiftCardType : 'eGift Card', 'addToCart').then(function () { 7282 // if (freeGiftBool !== true && response.freeGiftHtml.length > 0 && response.GWPParentLineID.length) { 7283 // $scope.SelectedGift.GWPParentLineID = response.GWPParentLineID; 7284 // $scope.freeGiftModal(); 7285 // } 7286 // });
7287 //} 7288 } else if (response.freeGiftHtml && response.freeGiftHtml.length && freeGiftBool !== true && response.GWPParentLineID.length) { // just free gift, not free GC 7289 var giftScope = angular.element(document.getElementById('FreeGiftController')).scope(); 7290 if (giftScope != undefined) { 7291 GWPParentLineID = response.GWPParentLineID; 7292 giftScope.freeGiftModal(); 7293 } 7294 } 7295 7296 $scope.flipDisabledAddToCartButton(false, false); 7297 7298 if ($window.quickviewJson != undefined) { 7299 $form.parents('.moby-container').children().trigger('click').off('click'); //close quick view modal 7300 } 7301 if ($window.location.href.indexOf('cart/viewcart') > -1) { // get cart if in cart 7302 var scope = angular.element(document.getElementById('ViewCartController')).scope(); 7303 if (scope != undefined) scope.getCart(); 7304 } 7305 AjaxCart.prototype.defaults.onSuccessCallback({}, response); 7306 } 7307 ); 7308 } 7309 7310 $scope.addToWishListPDP = function (id, promo) { 7311 if ($scope.variant) { 7312 id = $scope.variant.Sku.slice(1); 7313 } else { 7314 id = $scope.data.Sku.slice(1); 7315 } 7316 let valid = $scope.ValidateOptions(); 7317 if (valid === false) { 7318 return false; 7319 } else { 7320 return addToWishList($form, id, promo, null); 7321 } 7322 }; 7323 7324 $scope.$on('addToCartSticky', function (event, obj) { 7325 let response = true; 7326 if ($scope.data.Variants.length) { 7327 response = $scope.ValidateOptions() 7328 } 7329 if (response !== false) { 7330 return $scope.addToCartPDP(obj.id, obj.promo); //_StickyAddToCart 7331 } 7332 }) 7333 7334 $scope.openNotify = function () { 7335 $scope.notifyResponse = {}; // in case they open again after success / fail 7336 $scope.modal = { 7337 customCssClass: "notifyMeModal", 7338 title: "Notify Me!", 7339 templateUrl: "/templates/shared/notify-me-modal.html", 7340 clickOutsideToClose: true 7341 } 7342 return $mdDialog.show($mdDialog.modal({ scope: $scope })); 7343 } 7344 7345 $scope.submitNotifyMe = function () { 7346 var $form = $('#notifyme-form'); 7347 $form.validate(); 7348 if (!$form.valid()) { 7349 return false; 7350 } 7351 7352 var data = AjaxJsonPostWrapper.getFormData($form); 7353 if (data.ColorCode == null || data.ColorCode.length < 1) { 7354 data.ColorCode = "000"; 7355 } 7356 if (data.SizeCode == null || data.SizeCode.length < 1) { 7357 data.SizeCode = "000"; 7358 } 7359 7360 data.IsSubscribed = (data.IsSubscribed == "on") ? "true" : "false"; 7361 return AjaxJsonPostWrapper.ajaxRoute('product', 'notifymesubmit', { request: data, isSubscribed: data.IsSubscribed }, function (result) { 7362 $scope.notifyResponse = result; // NotifyMeResponse.cs as Json 7363 $mdDialog.hide(); 7364 $scope.openResponse(); 7365 }); 7366 }; 7367 7368 $scope.openResponse = function () { 7369 $scope.modal = { 7370 customCssClass: "notifyMeModal", 7371 title: "Notify Me!", 7372 templateUrl: "/templates/shared/notify-me-response.html", 7373 clickOutsideToClose: true 7374 } 7375 return $mdDialog.show($mdDialog.modal({ scope: $scope })); 7376 } 7377 7378 $scope.closeNotify = function () { 7379 $mdDialog.hide(); 7380 $scope.notifyResponse = {}; 7381 } 7382} 7383 7384ProductOptionsController.$inject = ['$scope', '$rootScope', '$mdDialog', '$sanitize', '_productService', '$document', '$timeout', '$filter', '$window']; 7385 7386; 7387var ProductSuggestionsController = function ($scope, $timeout, _certonaService) { 7388 7389} 7390 7391ProductSuggestionsController.$inject = ['$scope', '$timeout', '_certonaService'];; 7392var SezzleToolTipController = function($scope, $mdDialog, $attrs) { 7393 7394 var months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; 7395 7396 this.$onInit = function () { 7397 $scope.usePrice = $attrs.baseprice; 7398 $scope.sezzlePromo = $attrs.sezzlepromo === "Y"; 7399 } 7400 7401 $scope.showSezzleToolTip = function () { 7402 //if price contains - then use min price, otherwise use baseprice 7403 $scope.usePrice = $attrs.baseprice; 7404 7405 if (/[-]/.test($scope.usePrice)) { 7406 $scope.usePrice = $attrs.minprice; 7407 } 7408 7409 var renderSezzle = new AwesomeSezzle({ 7410 amount: $scope.usePrice, 7411 }); 7412 renderSezzle.alterPrice($scope.usePrice);
7413 renderSezzle.init(); 7414 7415 renderSezzle.renderModalByfunction(); 7416 7417 return false; 7418 } 7419 7420 $scope.closeDialog = function () { 7421 $mdDialog.hide(); 7422 } 7423} 7424 7425SezzleToolTipController.$inject = ['$scope', '$mdDialog', '$attrs'];; 7426var StickyAddToCartController = function ($scope, $rootScope) { 7427 7428 $scope.addToCartSticky = function(id, promo) { 7429 return $rootScope.$broadcast('addToCartSticky', {id: id, promo: promo}); 7430 } 7431 7432 $scope.scrollToCartActions = function () { 7433 $('html, body').animate({ scrollTop: $('.cart-actions').offset().top - 120 }, 200); 7434 } 7435 7436} 7437 7438StickyAddToCartController.$inject = ['$scope', '$rootScope'];; 7439var WarrantyController = function ($scope, $window, $location, $mdDialog, _productService) { 7440 7441 this.$onInit = function () { 7442 //grab from json object if pdp... or directive if cart 7443 if ($window.productJson != undefined) { 7444 $scope.data = $window.productJson.Warranty; 7445 $scope.data.CurrencyDisplay = $window.productJson.CurrencyDisplay; 7446 } else if ($window.quickviewJson != undefined) { // quick view check 7447 $scope.data = $window.quickviewJson.Warranty; 7448 $scope.data.CurrencyDisplay = $window.quickviewJson.CurrencyDisplay; 7449 } 7450 7451 $scope.data.cartPage = $location.path() === "/cart/viewcart"; 7452 $scope.data.confirmPage = $location.path() === "/checkout/confirmation"; 7453 $scope.data.addWarranty = $scope.data != undefined ? $scope.data.InCart : false; 7454 return false; 7455 } 7456 7457 $scope.changeAddWarranty = function () { 7458 var addWarrantyEl = document.getElementById("hdnAddWarranty"); 7459 if (addWarrantyEl != undefined) { 7460 addWarrantyEl.value = $scope.data.addWarranty; 7461 return false; 7462 } 7463 } 7464 7465 $scope.warrantyDetails = function () { 7466 $scope.modal = { 7467 customCssClass: "md-warranty-details-pdp-modal", 7468 title: "Protection Plan Details", 7469 templateUrl: "/templates/pdp/warranty-pdp-details-modal.html" 7470 } 7471 return $mdDialog.show($mdDialog.modal({ scope: $scope })); 7472 } 7473 7474 $scope.$on('skuChanged', function (e, prodData) { 7475 return $scope.getWarrantyForSku(prodData); 7476 }); 7477 7478 $scope.getWarrantyForSku = function (prodData) { 7479 return _productService.getWarrantyForSku(prodData).then(function (response) { 7480 if (response.Type && response.Type.length) { 7481 $scope.data.Type = response.Type; 7482 $scope.data.Term = response.Term; 7483 $scope.data.Description = response.Description; 7484 $scope.data.DisplayMsg = response.DisplayMsg; 7485 $scope.data.IsADH = response.IsADH; 7486 $scope.data.IsRepair = response.IsRepair; 7487 $scope.data.IsReplace = response.IsReplace; 7488 $scope.data.Price = response.Price; 7489 } 7490 }); 7491 } 7492 7493 $scope.warrantyClose = function () { 7494 return $scope.closeDialog(); 7495 } 7496 7497 $scope.closeDialog = function () { 7498 return $mdDialog.hide(); 7499 } 7500} 7501 7502WarrantyController.$inject = ['$scope', '$window', '$location', '$mdDialog', '_productService'];; 7503var DepartmentController = function ($scope, $window) { 7504 7505 this.$onInit = function () { 7506 7507 if ($window.monetateScript.length) { 7508 let monetateDiv = $('#monetateAjax'); 7509 7510 monetateDiv.empty(); 7511 if (monetateDiv.length) { 7512 monetateDiv.append($window.monetateScript); 7513 } 7514 } 7515 } 7516} 7517 7518DepartmentController.$inject = ['$scope', '$window'];; 7519var DoubleWideController = function ($scope, $mdDialog) { 7520 $scope.showDoubleWideDisclaimer = function (text) { 7521 $scope.DisclaimerText = text; 7522 $scope.modal = { 7523 title: 'Offer Details', 7524 customCssClass: 'double-wide-modal', 7525 templateUrl: "/templates/shared/coupon-promo-modal.html" 7526 } 7527 7528 $mdDialog.show($mdDialog.modal({ scope: $scope })); 7529 } 7530 7531 $scope.closeDialog = function () { 7532 $mdDialog.hide(); 7533 $scope.DisclaimerText = undefined; 7534 $scope.modal = undefined; 7535 } 7536 7537 $scope.openUrlOrDisclaimer = function (url, disclaimer) { 7538 if (disclaimer && disclaimer.trim().length > 0) { 7539 $scope.showDoubleWideDisclaimer(disclaimer); 7540 } 7541 else { 7542 if (url && url.trim().length > 0) { 7543 window.location = url; 7544 } 7545 } 7546 }; 7547} 7548 7549DoubleWideController.$inject = ['$scope', '$mdDialog'];; 7550var ProductListController = function ($scope, $timeout, $window, _certonaService) { 7551 7552 this.$onInit = function () { 7553 7554 if ($window.monetatePageScript.length || $window.monetateBreadCrumbScript.length || $window.monetateCartScript.length || $window.monetateProductListScript.length || $window.monetateSearchScript.length) { 7555 var fullMonetateScript = ""; 7556 7557 if ($window.monetatePageScript && $window.monetatePageScript.length) { 7558 fullMonetateScript = $window.monetatePageScript; 7559 } 7560 7561 if ($window.monetateBreadCrumbScript && $window.monetateBreadCrumbScript.length) { 7562 fullMonetateScript = fullMonetateScript + $window.monetateBreadCrumbScript; 7563 } 7564 7565 if ($window.monetateCartScript && $window.monetateCartScript.length) { 7566 fullMonetateScript = fullMonetateScript + $window.monetateCartScript; 7567 } 7568 7569 if ($window.monetateProductListScript && $window.monetateProductListScript.length) { 7570 fullMonetateScript = fullMonetateScript + $window.monetateProductListScript; 7571 } 7572 7573 if ($window.monetateSearchScript && $window.monetateSearchScript.length) { 7574 fullMonetateScript = fullMonetateScript + $window.monetateSearchScript; 7575 } 7576 7577 fullMonetateScript = fullMonetateScript + "<script id=\"monetateTrackData\" type=\"text/javascript\"> window.monetateQ.push([\"trackData\"]);<\/script>"; 7578 7579 var monetateDiv = $('#monetateAjax'); 7580 monetateDiv.empty(); 7581 if (monetateDiv.length) { 7582 monetateDiv.append(fullMonetateScript); 7583 } 7584 } 7585 7586 var initial = ($window.sortByInitial && $window.sortByInitial !== 'null') ? $window.sortByInitial : ''; 7587 var isAmmo = $window.sortIsAmmoCategory; 7588 7589 var opts = [ 7590 { value: 'f', text: 'Featured' }, 7591 { value: 'na', text: 'New Arrivals' }, 7592 { value: 'ssp', text: 'Savings % (High to Low)' }, 7593 { value: 'plh', text: 'Price (Low to High)' }, 7594 { value: 'phl', text: 'Price (High to Low)' } 7595 ]; 7596 7597 if (isAmmo) { 7598 opts.push({ value: 'pprlh', text: 'Price Per Round (Low to High)' }); 7599 } 7600 7601 opts.push({ value: 'r', text: 'Best Rated' }); 7602 7603 $scope.sortByOptions = opts; 7604 $scope.sortBySelection = initial || (opts.length ? opts[0].value : ''); 7605 } 7606 7607 $scope.$on('certona:ready', function () { 7608 var request = { 7609 page: 'productlist', 7610 showRv: true 7611 } 7612 7613 return _certonaService.getData(request).then(function (response) { 7614 for (var prop in response) { 7615 if (Object.prototype.hasOwnProperty.call(response, prop) && prop !== 'script' && response[prop].length) { 7616 $scope.certonaData = { 7617 type: prop, 7618 sliderData: response[prop] 7619 }; 7620 } 7621 7622 $timeout(function () { 7623 if (prop === 'script' && $("#certonaAjax").length && response[prop] && typeof $("#certonaAjax").append !== 'undefined') $("#certonaAjax").append(response[prop]); 7624 }, 250); 7625 7626 } 7627 7628 if ($scope.certonaData) $scope.certonaData.slideLoaded = true; 7629 }); 7630 });
7631 7632 $scope.changeSort = function (value) { 7633 if (!value) return; 7634 buildDDLink('sb', value, true); 7635 } 7636} 7637 7638ProductListController.$inject = ['$scope', '$timeout', '$window', '_certonaService']; 7639 7640var ProductListFilterController = function ($scope, $window) { 7641 7642 this.$onInit = function () { 7643 $scope.facets = {}; 7644 $scope.facets.checked = []; 7645 $scope.facets.newUrl = undefined; 7646 $scope.selected = []; 7647 $scope.filters = []; 7648 $scope.interacted = false; 7649 $scope.hasActiveFilters = false; 7650 7651 if ($window.filterList.length) { 7652 $scope.filters = $window.filterList; 7653 $scope.filters.forEach(function (filter) { 7654 7655 filter.facet.some(f => f.Checked) ? filter.isOpen = true : filter.isOpen = false; 7656 7657 }) 7658 } 7659 } 7660 7661 document.body.addEventListener('click', function (e) { 7662 $scope.interacted = true; 7663 }) 7664 document.body.addEventListener('mousedown', function (e) { 7665 $scope.interacted = true; 7666 }) 7667 document.body.addEventListener('mouseup', function (e) { 7668 $scope.interacted = true; 7669 }) 7670 document.body.addEventListener('touchstart', function (e) { 7671 $scope.interacted = true; 7672 }) 7673 7674 $scope.combineFacets = function (checked, qp, parentName, childName, count) { 7675 7676 if ($scope.interacted === false) { // ng-change run on load / init, wait for user 7677 return false; 7678 } 7679 7680 var newUrl = ""; 7681 var search = false; 7682 var searchString = ""; 7683 7684 if (window.location.search.length > 0) { 7685 search = true; 7686 searchString = window.location.search; 7687 } 7688 7689 var oldUrl = $scope.facets.newUrl != undefined ? $scope.facets.newUrl : window.location.pathname; 7690 7691 var hyp = oldUrl.lastIndexOf("/"); 7692 var front = oldUrl.substring(0, hyp - 2); 7693 var back = oldUrl.substring(hyp + 1); 7694 7695 if (back.indexOf('?k=') > -1) { 7696 var kIndex = back.lastIndexOf('?k'); 7697 back = back.substring(0, kIndex); 7698 } 7699 7700 var sections = front.split("/");// 0 = blank, 1 = 'L', 2 = dept, 3 = cat, 4 = ... 7701 7702 var decoded = window.atob(back); 7703 var decodedSplit = decoded.split('&'); // d=2 , c=200 , color_code ... 7704 7705 if (qp === "price_range") { 7706 childName = count; //count is 4,5,6 , childName is $50 to $100, etc 7707 } 7708 if (qp === "b") { 7709 childName[0].toUpperCase(); 7710 } 7711 7712 if (!checked) { 7713 // removing filter 7714 7715 var ind = decodedSplit.findIndex(x => x.split('=')[0] == qp); 7716 7717 if (ind > -1) { 7718 // if there are multiple filters for the same parent, only remove the one 7719 if (decodedSplit[ind].includes("%7e")) { 7720 decodedSplit[ind] = decodedSplit[ind].replace(childName, ''); 7721 decodedSplit[ind] = decodedSplit[ind].replace('%7e', ''); 7722 } else { 7723 decodedSplit.splice(ind, 1); 7724 7725 // also find the element in the front and remove it 7726 var ind = sections.findIndex(x => x.includes(childName)); 7727 sections.splice(ind, 1); 7728 7729 } 7730 } 7731 7732 } else if (checked) { 7733 // adding filter 7734 7735 // check to see if the param is already in the url 7736 var ind = decodedSplit.findIndex(x => x.split('=')[0] == qp); 7737 if (ind > -1) { 7738 var another = decodedSplit[ind] + "%7e" + childName; 7739 7740 // replace that param and we concat later 7741 decodedSplit[ind] = another; 7742 } else { 7743 decodedSplit.push(qp + "=" + childName.replaceAll(" ", "+")); 7744 } 7745 7746 sections.push(childName.replaceAll(" ", "-")); 7747 } 7748 7749 if (search) { 7750 // /l/search/2/-/cHJpY2VfcmFuZ2U9Mg==?k=gloves 7751 // /l/search/2/-/price_range=2?k=gloves 7752 7753 // if it's just a search, it's always 7754 // /l/search?k=searchTerm 7755 if (!checked) { 7756 if (oldUrl === '/l/search') { 7757 // just search term 7758 decodedSplit = []; 7759 sections = []; 7760 decodedSplit.push(qp + "=" + childName.replaceAll(" ", "+")); 7761 sections.push(""); 7762 sections.push("l"); 7763 sections.push("search"); 7764 sections.push(childName.replaceAll(" ", "-")); 7765 } 7766 } 7767 } 7768 7769 var newBack = ""; 7770 decodedSplit.forEach(function (param, index) { 7771 param = param.replace("++", "%2B%20"); //account for values that have a + then a space, need to keep the + 7772 if (index != 0) { 7773 newBack += "&" + param; 7774 } else { 7775 newBack += param; 7776 } 7777 }); 7778 7779 var newFront = ""; 7780 sections.forEach(function (section, index) {
7781 //mimic utility.createpagenamefromdesc, could call back end but would significantly slow down this porcess 7782 section = section.replace("&", "-").replace(" ", "-").replace("/", "-").replace(/[^A-Za-z0-9-.]+/g, "").toLowerCase(); 7783 if (index != 0) { 7784 newFront += "/" + section; 7785 } else { 7786 newFront += section; 7787 } 7788 }); 7789 7790 newUrl = newFront + "/-/" + window.btoa(newBack); 7791 7792 if (search && searchString.length > 0) { 7793 if (newBack.length > 0) { 7794 newUrl += searchString; 7795 } else { 7796 newUrl = newUrl.replace('/-/', ''); 7797 newUrl += searchString; 7798 } 7799 } 7800 7801 $scope.facets.newUrl = newUrl; 7802 7803 $scope.hasActiveFilters = $scope.filters.some(filter => 7804 filter && Array.isArray(filter.facet) && filter.facet.some(f => f && f.Checked === true) 7805 ); 7806 } 7807 7808 $scope.changePage = () => { 7809 if ($scope.facets.newUrl == undefined) { 7810 return; // they haven't selected anything 7811 } 7812 window.location.assign($scope.facets.newUrl) 7813 } 7814 7815 7816 7817 7818} 7819ProductListFilterController.$inject = ['$scope', '$window'];; 7820var ITACVendorDocumentsController = function ($scope, _vendorDocumentService) { 7821 this.$onInit = function () { 7822 _vendorDocumentService.getVendorDocuments(3).then( 7823 function (response) { 7824 if (response) { 7825 $scope.vendorDocumentData = response.data; 7826 } 7827 else { 7828 alert("Error Retreving Data"); 7829 } 7830 } 7831 ) 7832 } 7833} 7834 7835ITACVendorDocumentsController.$inject = ['$scope', '_vendorDocumentService'];; 7836var _bloomreachService = function ($http) { 7837 7838 var service = { 7839 getData: getData 7840 }; 7841 7842 return service; 7843 7844 function getData(request) { 7845 return $http.post("/bloomreachapi/getdata", { url: request.url, sectionId: request.sectionId}).then( 7846 function (response) { 7847 return response.data; }, 7848 function errorCallback() { 7849 return undefined; 7850 } 7851 ); 7852 } 7853} 7854 7855_bloomreachService.$inject = ["$http"];; 7856var _accountService = function ($http, $window) { 7857 7858 var service = { 7859 accountSignOut: accountSignOut, 7860 createAccountPostCheckout: createAccountPostCheckout, 7861 getTransactionsCustNum: getTransactionsCustNum, 7862 getOrderListDetails: getOrderListDetails, 7863 getLoyaltyTransactions: getLoyaltyTransactions, 7864 saveCard: saveCard, 7865 saveCardCheckout: saveCardCheckout, 7866 saveNewGiftCard: saveNewGiftCard, 7867 removeGiftCard: removeGiftCard, 7868 searchEcomGiftCard: searchEcomGiftCard, 7869 getStoredPaymentMethods: getStoredPaymentMethods, 7870 deleteCreditCard: deleteCreditCard, 7871 setDefaultCreditCard: setDefaultCreditCard, 7872 savePreferences: savePreferences, 7873 updateSMSOptions: updateSMSOptions, 7874 signedOutSubscribe: signedOutSubscribe, 7875 searchSubscribeEmail: searchSubscribeEmail, 7876 signedOutUnSubscribe: signedOutUnSubscribe 7877 }; 7878 7879 return service; 7880 7881 function accountSignOut() { 7882 return $http.post("Account/AccountSignOut").then( 7883 function (response) { 7884 $window.location.href = "/"; 7885 }, 7886 function errorCallBack() { 7887 return undefined; 7888 } 7889 ); 7890 }; 7891 7892 function createAccountPostCheckout(password, orderId) { 7893 return $http.post("/checkout/checkoutsummarycreatepassword", { password: password, orderId: orderId }).then( 7894 function (response) { 7895 return response.data; 7896 }, 7897 function errorCallBack() { 7898 return undefined; 7899 } 7900 ); 7901 }; 7902 7903 function getTransactionsCustNum() { 7904 return $http.post("/account/gettransactionscustnum").then( 7905 function (response) { 7906 return response.data; 7907 }, 7908 function errorCallBack() { 7909 return undefined; 7910 } 7911 ); 7912 }; 7913 7914 function getOrderListDetails() { 7915 return $http.post("/account/accountorderlistdetails").then( 7916 function (response) { 7917 return response.data; 7918 }, 7919 function errorCallBack() { 7920 return undefined; 7921 } 7922 ); 7923 }; 7924 7925 function getLoyaltyTransactions() { 7926 return $http.post("/account/getloyaltytransactions").then( 7927 function (response) { 7928 return response.data.loyaltyTransactions; 7929 }, 7930 function errorCallBack() { 7931 return undefined; 7932 } 7933 ); 7934 }; 7935 7936 function saveCard(cardId, isDefault) { 7937 return $http.post("/account/saveaccountcard", { cardId: cardId, isDefault: isDefault }).then( 7938 function (response) { 7939 return response.data.success; 7940 }, 7941 function errorCallback() { 7942 return undefined; 7943 }); 7944 }; 7945 7946 function saveCardCheckout(cardId) { 7947 return $http.post("/account/saveaccountcardcheckout", { cardId: cardId }).then( 7948 function (response) { 7949 return response.data; 7950 }, 7951 function errorCallback() { 7952 return undefined; 7953 }); 7954 }; 7955 7956 function saveNewGiftCard(number) { 7957 return $http.post('/giftcard/GiftCardAddToAccount', { cardNum: number }).then( 7958 function (response) { 7959 console.log('respnse: ', response) 7960 return response.data; 7961 }, 7962 function errorCallBack() { 7963 return undefined; 7964 }); 7965 }; 7966 7967 function removeGiftCard(number) { 7968 return $http.post('/giftcard/GiftCardRemoveFromAccount', { cardNum: number }).then( 7969 function (response) { 7970 return response.data; 7971 }, 7972 function errorCallBack() { 7973 return undefined; 7974 }); 7975 }; 7976 7977 function searchEcomGiftCard(cardNumber, pin) { 7978 7979 var giftCard = { 7980 ReferenceNumber: cardNumber, 7981 PinNumber: pin 7982 }; 7983 7984 return $http.post('/giftcard/GiftCardLookupJson', { giftCard: giftCard }).then( 7985 function (response) { 7986 return response.data; 7987 }, 7988 function errorCallBack() { 7989 return undefined; 7990 }); 7991 }; 7992 7993 function getStoredPaymentMethods(phone, email) { 7994 return $http.post("/account/getStoredPaymentMethods").then( 7995 function (response) { 7996 return response.data; 7997 }, 7998 function errorCallBack() { 7999 return undefined; 8000 }); 8001 } 8002 8003 function deleteCreditCard(id) { 8004 return $http.post("/account/deletecardjson", { id: id }).then( 8005 function (response) { 8006 return response.data; 8007 }, 8008 function errorCallBack() { 8009 return undefined; 8010 }); 8011 } 8012
8013 function setDefaultCreditCard(id) { 8014 return $http.post("/account/makedefaultcardjson", { id: id }).then( 8015 function (response) { 8016 return response.data; 8017 }, 8018 function errorCallBack() { 8019 return undefined; 8020 }); 8021 } 8022 8023 function savePreferences(prefs) { 8024 return $http.post("/email/SaveEmailPreferencesJson", { emailPreferences: prefs }).then( 8025 function (response) { 8026 return response.data; 8027 }, 8028 function errorCallBack() { 8029 return undefined; 8030 }); 8031 } 8032 8033 function updateSMSOptions(phone, email) { 8034 return $http.post("/account/UpdateTextMessageNumberJson", { phoneNumber: phone, email: email }).then( 8035 function (response) { 8036 return response.data; 8037 }, 8038 function errorCallBack() { 8039 return undefined; 8040 }); 8041 } 8042 8043 function signedOutSubscribe(email) { 8044 return $http.post("/account/subscribejson", { email: email, emailSource: "Customer Service Contacts Page" }).then( 8045 function (response) { 8046 return response.data; 8047 }, 8048 function errorCallBack() { 8049 return undefined; 8050 }); 8051 } 8052 8053 function signedOutUnSubscribe(email) { 8054 return $http.post("/account/Unsubscribe", { email: email }).then( 8055 function (response) { 8056 return response.data; 8057 }, 8058 function errorCallBack() { 8059 return undefined; 8060 }); 8061 } 8062 8063 function searchSubscribeEmail(email) { 8064 return $http.post("/email/LookupEmailPreferencesNoHtml", { email: email }).then( 8065 function (response) { 8066 return response.data; 8067 }, 8068 function errorCallBack() { 8069 return undefined; 8070 }); 8071 } 8072} 8073 8074_accountService.$inject = ["$http", "$window"];; 8075var _addressService = function ($http) { 8076 8077 var service = { 8078 getAddressInfo: getAddressInfo, 8079 getAddressBook: getAddressBook, 8080 getAccountAddressBook: getAccountAddressBook, 8081 removeAddress: removeAddress, 8082 setAccountAddressDefault: setAccountAddressDefault, 8083 saveAnyAddress: saveAnyAddress, 8084 getCountryDropDownList: getCountryDropDownList, 8085 getStateDropDownList: getStateDropDownList, 8086 saveAddressInfo: saveAddressInfo, 8087 saveAddressBook: saveAddressBook, 8088 saveAgeComplianceInfo: saveAgeComplianceInfo 8089 }; 8090 8091 return service; 8092 8093 function getAddressInfo() { 8094 return $http.get("/Checkout/GetAddressInfo").then( 8095 function (response) { 8096 return response.data.checkoutAddress; //CheckoutAddress 8097 }, 8098 function errorCallback() { 8099 return undefined; 8100 }); 8101 } 8102 8103 function getAddressBook() { 8104 return $http.get("/Checkout/GetAddressBook").then( 8105 function (response) { 8106 return response.data.addressBook; //AccountAddressBook 8107 }, 8108 function errorCallback() { 8109 return undefined; 8110 }); 8111 } 8112 8113 function getAccountAddressBook() { 8114 return $http.post("/account/getaccountaddressbook").then( 8115 function (response) { 8116 return response.data.accountAddressBook; //AccountAddressBook (w/billing) 8117 }, 8118 function errorCallback() { 8119 return undefined; 8120 }); 8121 } 8122 8123 function removeAddress(id) { //address number 8124 return $http.post("/account/accountaddressdelete", { id: id }).then( 8125 function (response) { 8126 return response.data; //success, new default 8127 }, 8128 function errorCallback() { 8129 return undefined; 8130 }); 8131 } 8132 8133 function setAccountAddressDefault(id) { //address number 8134 return $http.post("/account/setaccountaddressdefault", { id: id }).then( 8135 function (response) { 8136 return response.data.success; 8137 }, 8138 function errorCallback() { 8139 return undefined; 8140 }); 8141 } 8142 8143 function saveAnyAddress(address) { //AccountAddress 8144 return $http.post("/account/saveanyaddress", { address: address }).then( 8145 function (response) { 8146 return response.data; //success, error 8147 }, 8148 function errorCallback() { 8149 return undefined; 8150 }); 8151 } 8152 8153 function getCountryDropDownList() { 8154 return $http.get("/Checkout/GetCountryDropDown").then( 8155 function (response) { 8156 return response.data.countryList; //List<CountryItem> 8157 }, 8158 function errorCallback() { 8159 return undefined; 8160 } 8161 ); 8162 } 8163 8164 function getStateDropDownList(country) { 8165 return $http.post("/Checkout/GetStateDropDown", { country: country }).then( 8166 function (response) { 8167 return response.data.stateList; //List<StateItem> 8168 }, 8169 function errorCallBack() { 8170 return undefined; 8171 } 8172 ); 8173 } 8174 8175 function saveAddressInfo(checkoutAddress) { //CheckoutAddress 8176 return $http.post("/Checkout/SaveAddressInfo", { address: checkoutAddress }).then( 8177 function (response) { 8178 return response.data.response; //SaveAddressResponse 8179 }, 8180 function errorCallBack() { 8181 return undefined; 8182 } 8183 ); 8184 } 8185 8186 function saveAddressBook(address) { //AccountAddress 8187 return $http.post("/Checkout/SaveAddressBook", { address: address }).then( 8188 function (response) { 8189 return response.data.success; //boolean 8190 }, 8191 function errorCallBack() { 8192 return undefined; 8193 } 8194 ); 8195 } 8196 8197 function saveAgeComplianceInfo(checkoutAddress) { //Age and Compliance 8198 return $http.post("/Checkout/SaveAgeComplianceInfo", { address: checkoutAddress }).then( 8199 function (response) { 8200 return response.data; 8201 }, 8202 function errorCallBack() { 8203 return undefined; 8204 } 8205 ); 8206 } 8207} 8208 8209_addressService.$inject = ["$http"];; 8210var _algoliaService = function ($http) { 8211 8212 var service = { 8213 sendAlgoliaInsightProductClick: sendAlgoliaInsightProductClick 8214 }; 8215 8216 return service; 8217 8218 function sendAlgoliaInsightProductClick(itemId, position, queryId, eventName, cost) { 8219 return $http.post("/algolia/algoliaclickevent", { eventObject: { eventName: eventName, objectIDs: [itemId], positions: [position], queryID: queryId, value: cost } }); 8220 } 8221 8222}; 8223 8224_algoliaService.$inject = ["$http"];; 8225var _authenticateService = function($http) { 8226 var service = { 8227 GuestCheckout: GuestCheckout, 8228 AccountLoginCheckout: AccountLoginCheckout, 8229 PayPalCheckoutLogin: PayPalCheckoutLogin, 8230 AccountChangePassword: AccountChangePassword, 8231 AccountChangeEmail: AccountChangeEmail, 8232 }; 8233 8234 return service; 8235 8236 function GuestCheckout() { 8237 return $http.post("/Authenticate/GuestCheckout").then( 8238 function () { 8239 return undefined; 8240 }, 8241 function errorCallBack() { 8242 return undefined; 8243 } 8244 ); 8245 } 8246 8247 function AccountLoginCheckout(loginModel) { //userloginviewmodel 8248 return $http.post("/Authenticate/AccountLoginCheckout", { loginModel: loginModel }).then( 8249 function (response) { 8250 return response.data; 8251 }, 8252 function errorCallback() { 8253 return undefined; 8254 }); 8255 } 8256 8257 function PayPalCheckoutLogin(payPal, address) { 8258 return $http.post("/authenticate/paypalcheckoutlogin", { PayPal: payPal, Address: address }).then( 8259 function (response) { 8260 return response.data; 8261 }, 8262 function errorCallback() { 8263 return undefined; 8264 } 8265 ) 8266 } 8267 8268 function AccountChangePassword(credModel) { 8269 return $http.post("/account/accountcredentialschangepassword", { model: credModel }).then( 8270 function (response) { 8271 return response.data; 8272 }, 8273 function errorCallback() { 8274 return undefined; 8275 } 8276 ); 8277 } 8278 function AccountChangeEmail(credModel) { 8279 return $http.post("/account/accountcredentialschangeemail", { model: credModel }).then( 8280 function (response) { 8281 return response.data; 8282 }, 8283 function errorCallback() { 8284 return undefined; 8285 } 8286 ); 8287 } 8288} 8289_authenticateService.$inject = ["$http"];; 8290//NOTE: if you add a new get/post, you must include the route in RouteConfig.cs due to canonical routing issues 8291var _blogService = function ($http) { 8292 var service = { 8293 getBlogHomeData: getBlogHomeData, 8294 getBlogCatagoryData: getBlogCatagoryData, 8295 getCategoryMonetateScript: getCategoryMonetateScript 8296 }; 8297 8298 return service; 8299 8300 function getBlogHomeData() { 8301 return $http.post("/blogapi/getbloghomedata").then( 8302 function (response) { 8303 if (response.data.model == undefined) return undefined; 8304 8305 return response.data.model; 8306 8307 }, function errorCallBack() { 8308 return undefined; 8309 }); 8310 } 8311 8312 function getBlogCatagoryData(category) { 8313 return $http.post("/blogapi/getblogcategorydata", { categoryId: category }).then( 8314 function (response) { 8315 return response.data; 8316 }, function errorCallBack() { 8317 return undefined; 8318 }); 8319 } 8320 8321 function getCategoryMonetateScript() { 8322 return $http.post("/blogapi/getmonetatescript").then( 8323 function (response) { 8324 return response.data 8325 }, function errorCallBack() { 8326 return undefined; 8327 }); 8328 } 8329} 8330 8331_blogService.$inject = ["$http"];; 8332var _cartService = function ($http) { 8333 8334 var service = { 8335 getCart: getCart, 8336 getEstShip: getEstShip, 8337 //removeItemsInCheckout: removeItemsInCheckout, 8338 updateCartQuantity: updateCartQuantity, 8339 //getFreightWeight: getFreightWeight, 8340 //getFreightAckMsg: getFreightAckMsg, 8341 //sendAckMsg: sendAckMsg, 8342 //setFreightDeliveryOption: setFreightDeliveryOption, 8343 setSpecifyShipDate: setSpecifyShipDate, 8344 setCartTealium: setCartTealium, 8345 isPayPalRestricted: isPayPalRestricted, 8346 modifyCartWarranty: modifyCartWarranty, 8347 modifyCartGloveBreakIn: modifyCartGloveBreakIn, 8348 putGiftCardRecipient: putGiftCardRecipient, 8349 getGiftCardRecipient: getGiftCardRecipient, 8350 getFreeShippingThreshold: getFreeShippingThreshold, 8351 couponSubmit: couponSubmit, 8352 removeCoupon: removeCoupon 8353 }; 8354 8355 return service; 8356 8357 function getCart() { 8358 return $http.get("/Cart/GetCart").then( function (response) { 8359 if (response.data.cart) { 8360 response.data.cart.CartEntryList.forEach(function(cartEntry) { 8361 //if (cartEntry.Warranty.ItemId > 0) { 8362 // cartEntry.Warranty.CurrencyDisplay = response.data.cart.CurrencyDisplay; 8363 //} 8364 }); 8365 } 8366 8367 return response.data.cart; //CartModel 8368 }, function errorCallback() { 8369 return undefined; 8370 }); 8371 } 8372 8373 function getEstShip(zip) { //string 8374 return $http.post("/Cart/EstimateShippingResult", { zipCode: zip }).then(function (response) { 8375 return response.data.result; //EstimatedShippingViewModel 8376 }, function errorCallback() { 8377 return undefined; 8378 }); 8379 } 8380 8381 //function removeItemsInCheckout(entryIds) { 8382 // return $http.post("/Cart/RemoveItemsInCheckout", { entryIds: entryIds }).then( 8383 // function (response) { 8384 // return response.data.checkout; 8385 // }, 8386 // function errorCallBack() { 8387 // return undefined; 8388 // } 8389 // ); 8390 //} 8391 8392 function updateCartQuantity(id, qty, cqo) { 8393 return $http.post("/Cart/UpdateQty", { entryId: id, qty: qty, cqo: cqo }).then( 8394 function (response) { 8395 return response.data; 8396 }, 8397 function errorCallBack() { 8398 return undefined; 8399 } 8400 ); 8401 } 8402 8403 //function getFreightWeight(item) { 8404 8405 // var req = {
8406 // ItemId: item.ID, 8407 // SizeCode: item.SizeCode, 8408 // ColorCode: item.ColorCode 8409 // } 8410 8411 // return $http.post("/Cart/GetFreightData", { request: req }).then( 8412 // function (response) { 8413 // return response.data.data; 8414 // }, 8415 // function errorCallBack() { 8416 // return undefined; 8417 // } 8418 // ); 8419 //} 8420 8421 //function getFreightAckMsg() { 8422 // return $http.post("/Cart/GetAckMessages").then( 8423 // function (response) { 8424 // return response.data.ackMessages.Liftgate.Message 8425 // } 8426 // ); 8427 //} 8428 8429 //function sendAckMsg(id) { 8430 // return $http.post("/Cart/SendAckMessage", { ackId: id }).then( 8431 // function(response) { 8432 // return response; 8433 // } 8434 // ); 8435 //} 8436 8437 //function setFreightDeliveryOption(request) { 8438 // return $http.post("/Cart/SetFreightDeliveryOpt", { request: request }).then( 8439 // function (response) { 8440 // return response; 8441 // } 8442 // ); 8443 //} 8444 8445 function setSpecifyShipDate(entryId, shipDate) { 8446 return $http.post("/Cart/UpdateSpecifyShipDate", { entryId: entryId, shipDate: shipDate}).then( 8447 function(response) { 8448 return response; 8449 } 8450 ); 8451 } 8452 8453 function setCartTealium() { 8454 8455 return $http.post("/cart/setcarttealium").then( 8456 function (response) { 8457 return response.data; //tagParams, utag 8458 }, 8459 function errorCallback() { 8460 return undefined; 8461 }); 8462 } 8463 8464 function isPayPalRestricted() { 8465 return $http.get("/Cart/IsPaypalRestricted").then( 8466 function (response) { 8467 return response.data.payPalRestricted; 8468 }, 8469 function errorCallback() { 8470 return true; 8471 }); 8472 } 8473 8474 function modifyCartWarranty(entryId, toggle) { 8475 return $http.post("/cart/modifycartwarranty", { entryId: entryId, toggle: toggle }).then( 8476 function (response) { 8477 return response.data.success; 8478 }, 8479 function errorCallback() { 8480 return undefined; 8481 }); 8482 } 8483 8484 function modifyCartGloveBreakIn(entryId, toggle) { 8485 return $http.post("/cart/modifycartglovebreakin", { entryId: entryId, toggle: toggle }).then( 8486 function (response) { 8487 return response.data.success; 8488 }, 8489 function errorCallback() { 8490 return undefined; 8491 }); 8492 } 8493 8494 function putGiftCardRecipient(recipient) { 8495 return $http.post("/cart/putgcrecipient", { recipient }).then( 8496 function (response) { 8497 return response.data.success; 8498 }, 8499 function errorCallback() { 8500 return undefined; 8501 }); 8502 } 8503 8504 function getGiftCardRecipient(entryId) { 8505 return $http.post("/cart/getgcrecipient", { entryId }).then( 8506 function (response) { 8507 return response.data.recipient; 8508 }, 8509 function errorCallback() { 8510 return undefined; 8511 }); 8512 } 8513 8514 function getFreeShippingThreshold() { 8515 return $http.post("/cart/getfreeshippingthreshold").then(function (response) { 8516 return response.data.result; 8517 }, function errorCallback() { 8518 return undefined; 8519 }); 8520 } 8521 8522 function couponSubmit(couponCode) { 8523 return $http.post("/Checkout/CouponSubmit", { couponCode: couponCode }).then( 8524 function (response) { 8525 return response.data.msgResponse; 8526 }, 8527 function errorCallback() { 8528 return undefined; 8529 } 8530 ); 8531 } 8532 8533 function removeCoupon(couponCode) { 8534 return $http.post("/Checkout/RemoveCoupon", { couponCode: couponCode }).then( 8535 function (response) { 8536 return response.data.msgResponse; 8537 }, 8538 function errorCallback() { 8539 return undefined; 8540 } 8541 ); 8542 } 8543 8544} 8545 8546_cartService.$inject = ["$http"];; 8547var _certonaService = function ($http, $sce) { 8548 8549 var service = { 8550 getFreqPurchased: getFreqPurchased, 8551 getCartSliders: getCartSliders, 8552 getData: getData 8553 }; 8554 8555 return service; 8556 8557 function getFreqPurchased(itemId) { 8558 return $http.post("/dynamicdata/getcertonadata", 8559 { page: "product", showRV: false, showClearance: false, showNewArrivals: false, itemId: itemId }).then(function (response) { 8560 return $sce.trustAsHtml(response.data.dontForget); //markup from razer view (for now), dont forget is frequently purchased together 8561 }, function errorCallback() { 8562 return undefined; 8563 }); 8564 } 8565 8566 function getCartSliders(cartItemIds) { 8567 return $http.post("/dynamicdata/getcertonadata", 8568 { page: "viewcart", showRV: false, showClearance: false, showNewArrivals: false, itemId: cartItemIds }).then(function (response) { 8569 return { //2 different markups from razer view (for now) 8570 cartRecs: $sce.trustAsHtml(response.data.cartRecs), 8571 cartSpecials: $sce.trustAsHtml(response.data.cartSpecials) 8572 }; 8573 }, function errorCallback() { 8574 return undefined; 8575 }); 8576 } 8577 8578 function getData(request) { 8579 return $http.post("/dynamicdata/getmonetaterecsdata", { page: request.page, showRV: request.showRv, showClearance: request.showClearance, showNewArrivals: request.showNewArrivals, showTopGifts: request.showTopGifts, 8580 showTopPicks: request.showTopPicks, showYMAL: request.showYMAL, showFPT: request.showFPT, showDontForget: request.showDontForget, showTrendingNow: request.showTrendingNow, itemId: request.itemId 8581 }).then( 8582 function (response) { 8583 return response.data; 8584 }, 8585 function errorCallback() { return undefined; } 8586 ); 8587 } 8588} 8589 8590_certonaService.$inject = ["$http", "$sce"];; 8591var _chatService = function ($http) { 8592 8593 var service = { 8594 getAvailable: getAvailable 8595 }; 8596 8597 return service; 8598 8599 function getAvailable() { 8600 var date = ''; 8601 return $http.post("/main/chatschedulecheck", { checkDate: date}).then( 8602 function (response) { 8603 return response.data; 8604 }, 8605 function errorCallback() { 8606 return undefined; 8607 }); 8608 } 8609 8610} 8611 8612_chatService.$inject = ["$http"];; 8613var _cloudflareService = function ($http) { 8614 var service = { 8615 GetVideoDetail: GetVideoDetail 8616 }; 8617 8618 return service; 8619 8620 function GetVideoDetail(id) { 8621 return $http.post("/cloudflareapi/getvideodetail", { id: id }).then( 8622 function (response) { 8623 return response.data; 8624 }, 8625 function errorCallback() { 8626 return undefined; 8627 } 8628 ); 8629 } 8630} 8631 8632_cloudflareService.$inject = ["$http"];; 8633var _clubService = function ($http) { 8634 8635 var service = { 8636 getClubOfferViewModel: getClubOfferViewModel, 8637 getClubCustomer: getClubCustomer, 8638 getClubExclusivesViewModel: getClubExclusivesViewModel, 8639 removeExclusiveItemFromCart: removeExclusiveItemFromCart, 8640 declineClubOffer: declineClubOffer, 8641 acceptClubOffer: acceptClubOffer, 8642 getRedeemableClubBucks: getRedeemableClubBucks, 8643 validateAndApplyClubBucks: validateAndApplyClubBucks, 8644 removeClubBucks: removeClubBucks, 8645 getClubInfo: getClubInfo 8646 }; 8647 8648 return service; 8649 8650 function getClubOfferViewModel() { //switch to determine whether or not we honor the hasPitched cookie on the server 8651 return $http.post("/checkout/getClubOfferViewModel").then( 8652 function (response) { 8653 return response.data.clubOfferViewModel; //ClubOfferViewModel from the server 8654 }, 8655 function errorCallback() { 8656 return undefined; 8657 }); 8658 } 8659 8660 function getClubCustomer() { 8661 return $http.get("/checkout/getClubCustomer").then( 8662 function (response) { 8663 return response.data.ClubCustomer; //ClubCustomer from the server 8664 }, 8665 function errorCallback() { 8666 return undefined; 8667 }); 8668 } 8669 8670 function getClubExclusivesViewModel() { 8671 return $http.get("/checkout/getclubexclusivesviewmodel").then( 8672 function (response) { 8673 return response.data.clubExclusivesViewModel; //GetClubExclusivesViewModel from the server 8674 }, 8675 function errorCallback() { 8676 return undefined; 8677 }); 8678 } 8679 8680 function removeExclusiveItemFromCart() { 8681 return $http.post("/checkout/removeexclusiveitemfromcart", {}).then( 8682 function (response) { 8683 return response.data.payment; //bool, true means there are some items still in cart 8684 }, 8685 function errorCallback() { 8686 return undefined; 8687 }); 8688 } 8689 8690 function declineClubOffer(clubOfferViewModel) { // ClubOfferViewModel object 8691 clubOfferViewModel.OfferType = undefined; //has a percent int it, which triggers WAF db security filter 8692 8693 return $http.post("/checkout/declinecluboffer", { model: clubOfferViewModel }).then( 8694 function (response) { 8695 return response.data.success; //bool, always true 8696 }, 8697 function errorCallback() { 8698 return undefined; 8699 }); 8700 } 8701 8702 function acceptClubOffer(clubOfferViewModel) { // ClubOfferViewModel object 8703 clubOfferViewModel.OfferType = undefined; //has a percent int it, which triggers WAF db security filter 8704 8705 if (clubOfferViewModel.ClubId == null || clubOfferViewModel.ClubId == undefined) { 8706 clubOfferViewModel.ClubId = "803"; 8707 } 8708 8709 return $http.post("/checkout/acceptcluboffer", { model: clubOfferViewModel }).then( 8710 function (response) { 8711 return response.data; 8712 }, 8713 function errorCallback() { 8714 return undefined; 8715 }); 8716 } 8717 8718 function getRedeemableClubBucks() { 8719 return $http.get("/checkout/GetRedeemableClubBucks").then( 8720 function(response) { 8721 return response.data.ClubBucks; 8722 }, 8723 function errorCallback() { 8724 return undefined; 8725 }); 8726 } 8727 8728 function validateAndApplyClubBucks() { 8729 return $http.get("/checkout/ValidateAndApplyClubBucks").then( 8730 function (response) { 8731 return response.data.ClubBucks; 8732 }, 8733 function errorCallback() { 8734 return undefined; 8735 }); 8736 } 8737 8738 function removeClubBucks() { 8739 return $http.get("/checkout/RemoveClubBucks").then( 8740 function (response) { 8741 return response.data.ClubBucks; 8742 }, 8743 function errorCallback() { 8744 return undefined; 8745 }); 8746 } 8747 8748 function getClubInfo(promoCode, clubSku) { 8749 return $http.post("/club/GetClubOffer", { promoCode: promoCode, clubSku: clubSku }).then( 8750 function(response) { 8751 return response.data.clubOffer; 8752 }, 8753 function errorCallback() { 8754 return undefined; 8755 } 8756 ); 8757 } 8758}; 8759 8760_clubService.$inject = ["$http"];; 8761var _configService = function ($http) { 8762 8763 var service = { 8764 getConfigValues: getConfigValues, 8765 getPublicSquareConfig: getPublicSquareConfig 8766 }; 8767 8768 return service; 8769 8770 function getConfigValues() { 8771 return $http.get("/Main/GetConfigValues").then( 8772 function (response) { 8773 return response.data.configValues; 8774 }, 8775 function errorCallback() { 8776 return undefined; 8777 }); 8778 } 8779 function getPublicSquareConfig(timeStamp) { 8780 return $http.get("/main/getpublicsquareconfig?ts=" + timeStamp).then( 8781 function (response) { 8782 return response.data; 8783 }, 8784 function errorCallback() { 8785 return undefined; 8786 }); 8787 } 8788} 8789 8790_configService.$inject = ["$http"];; 8791//hahahahahaahaha 8792var _customerServiceService = function ($http) { 8793 var service = { 8794 submitPayment: submitPayment, 8795 findCustNum: findCustNum, 8796 getCreditTransactions: getCreditTransactions 8797 }; 8798 8799 return service; 8800 8801 function submitPayment(cardModel, ticketId, paymentAmount) { 8802 return $http.post("/CustomerService/submitPayment", { card: cardModel, ticketId: t
8802icketId, paymentAmount: paymentAmount }).then( 8803 function(response) { 8804 return response.data.status; 8805 }, 8806 function errorCallBack() { 8807 return "U"; 8808 }); 8809 } 8810 8811 function findCustNum(email) { 8812 return $http.post("/customerservice/findcustnum", { email: email }).then( 8813 function (response) { return response.data.custNum; }, 8814 function errorCallBack() { return 0; }); 8815 } 8816 8817 function getCreditTransactions(lastName, customerNumber, phoneNumber) { 8818 if (typeof customerNumber === 'undefined') customerNumber = 0; 8819 return $http.post("/customerservice/transactions", { lastName: lastName, customerNumber: customerNumber, phoneNumber: phoneNumber }).then 8820 (function (response) { 8821 return response.data; 8822 }, 8823 function errorCallBack() { 8824 return undefined; 8825 }); 8826 } 8827}; 8828var _logService = function ($http) { 8829 8830 var service = { 8831 error: error 8832 }; 8833 8834 return service; 8835 8836 function error(logError) { //LogError 8837 return $http.post("/Error/LogError", { error: logError }).then( 8838 function (response) { 8839 return response.data.success; //boolean 8840 }, 8841 function errorCallback() { 8842 return undefined; 8843 }); 8844 } 8845} 8846 8847_logService.$inject = ["$http"];; 8848var _mediaService = function ($http) { 8849 8850 var service = { 8851 getMedia: getMedia, 8852 get3PlayMedia: get3PlayMedia 8853 }; 8854 8855 return service; 8856 8857 function getMedia(itemId) { 8858 if (itemId == null || itemId === "") return false; 8859 8860 return $http.get("/product/getmedia?itemId=" + itemId).then( 8861 function (response) { 8862 return response.data.media; //List<ProductMedia> 8863 }, 8864 function errorCallback() { 8865 return undefined; 8866 }); 8867 } 8868 8869 function get3PlayMedia(cfKey) { 8870 return $http.post("/video/get3playmedia", { cfKey: cfKey }).then( 8871 function (response) { 8872 return response.data.threePlay; //ThreePlayMediaInfo 8873 }, 8874 function errorCallback() { 8875 return undefined; 8876 }); 8877 } 8878} 8879 8880_mediaService.$inject = ["$http"];; 8881var _orderService = function ($http) { 8882 8883 var service = { 8884 getOrderTracking: getOrderTracking, 8885 cancelMultiItemRequest: cancelMultiItemRequest, 8886 getTransactionData: getTransactionData, 8887 getOrderPayByLink: getOrderPayByLink, 8888 submitPayByLink: submitPayByLink 8889 }; 8890 8891 return service; 8892 8893 function getOrderTracking(orderNumber, trackingNumber) { 8894 return $http.post("/order/getordertracking", { orderNumber: orderNumber, trackingNumber: trackingNumber }).then( 8895 function (response) { 8896 return response.data; //order = Order.cs; certona, skyscraper = ContainerViewModel.cs; skyscraperHtml, certonaHtml 8897 }, 8898 function errorCallback() { 8899 return undefined; 8900 }); 8901 } 8902 8903 function cancelMultiItemRequest(request) { 8904 return $http.post("/order/itemcancellation", { request: request }).then( 8905 function (response) { 8906 return response.data; 8907 }, 8908 function errorCallback() { 8909 return undefined; 8910 }); 8911 } 8912 8913 function getTransactionData(orderNumber, customerNumber) { 8914 return $http.post("/order/gettransactiondata", { orderNumber: orderNumber, customerNumber: customerNumber }).then( 8915 function(response) { 8916 return response.data; 8917 }, 8918 function errorCallback() { 8919 return undefined; 8920 }); 8921 } 8922 8923 function getOrderPayByLink(key) { 8924 return $http.post("/order/getorderpaybylink", { key: key }).then( 8925 function (response) { 8926 return response.data; 8927 }, 8928 function errorCallback() { 8929 return undefined; 8930 }); 8931 } 8932 8933 function submitPayByLink(payment) { 8934 return $http.post("/order/submitpaybylink", { payment: payment }).then( 8935 function (response) { 8936 return response.data; 8937 }, 8938 function errorCallback() { 8939 return undefined; 8940 }); 8941 } 8942} 8943 8944_orderService.$inject = ["$http"]; 8945; 8946var _productService = function ($http, $window) { 8947 8948 var service = { 8949 getWarrantyForSku: getWarrantyForSku, 8950 getCompanionOption: getCompanionOption, 8951 accountSignOut: accountSignOut, 8952 addToCart: addToCart, 8953 getNavCategories: getNavCategories, 8954 }; 8955 8956 return service; 8957 8958 function accountSignOut() { 8959 return $http.post("Account/AccountSignOut").then( 8960 function (response) { 8961 $window.location.href = "/"; 8962 }, 8963 function errorCallBack() { 8964 return undefined; 8965 } 8966 ); 8967 } 8968 8969 function getWarrantyForSku(prodData) { 8970 return $http.post("/product/getwarrantyforsku", { request: prodData }).then( 8971 function (response) { 8972 return response.data.warranty; 8973 }, 8974 function errorCallback() { 8975 return undefined; 8976 }); 8977 } 8978 8979 function getCompanionOption(request) { 8980 return $http.post("/product/getcompanionoption", { option: request }).then( 8981 function (response) { 8982 return response.data.option; 8983 }, 8984 function errorCallback() { 8985 return undefined; 8986 }); 8987 } 8988 8989 function addToCart(formData) { 8990 return $http.post("/cart/AddToCart", { data: formData }).then(function (response) { 8991 return response.data; 8992 }, function errorCallback() { 8993 return undefined; 8994 }) 8995 } 8996 8997 function getNavCategories() { 8998 return $http.post("/sitemap/GetDepartmentListJson").then(function (response) { 8999 return response.data; 9000 }) 9001 } 9002} 9003 9004_productService.$inject = ["$http", "$window"];; 9005var _userService = function ($http) { 9006 9007 var service = { 9008 getUserInfo: getUserInfo, 9009 getIpAddress: getIpAddress, 9010 userAccountExists: userAccountExists, 9011 getUserInfoCheckout: getUserInfoCheckout, 9012 needsMemberAccount: needsMemberAccount 9013 }; 9014 9015 return service; 9016 9017 function getUserInfo() { 9018 return $http.get("/Account/GetUserInfo").then( 9019 function (response) { 9020 return response.data.userInfo; //UserInfoViewModel 9021 }, 9022 function errorCallback() { 9023 return undefined; 9024 }); 9025 } 9026
9027 function getIpAddress() { 9028 return $http.post("/main/getipaddress").then( 9029 function (response) { 9030 return response.data; //ipv6 string, pseudo string 9031 }, 9032 function errorCallback() { 9033 return undefined; 9034 }); 9035 } 9036 9037 function userAccountExists(email) { 9038 return $http.post("/Account/CheckEmail", {email: email}).then( 9039 function (response) { 9040 return response.data.IsValid; //boolean 9041 }, 9042 function errorCallback() { 9043 return undefined; 9044 }); 9045 } 9046 9047 function getUserInfoCheckout() { 9048 return $http.get("/checkout/getuserinfo").then( 9049 function (response) { 9050 return response.data.userInfo; //UserInfoViewModel 9051 }, 9052 function errorCallback() { 9053 return undefined; 9054 }); 9055 } 9056 9057 function needsMemberAccount(email) { 9058 return $http.post("/account/needsmemberaccount", { email: email }).then( 9059 function (response) { 9060 return response.data.needsAccount 9061 }, 9062 function errorCallback() { 9063 return undefined; 9064 }); 9065 } 9066} 9067 9068_userService.$inject = ["$http"];; 9069var _vendorDocumentService = function ($http) { 9070 var service = { 9071 getVendorDocuments: getVendorDocuments 9072 }; 9073 9074 return service; 9075 9076 function getVendorDocuments(pageId) { 9077 return $http.post("/document/getvendordocuments", { pageId: pageId }).then( 9078 function (response) { 9079 return response.data; 9080 }, 9081 function errorCallBack() { 9082 return undefined; 9083 } 9084 ); 9085 } 9086} 9087 9088_vendorDocumentService.$inject = ['$http']; 9089var _webPageService = function ($http) { 9090 9091 var service = { 9092 getWebPageModel: getWebPageModel 9093 }; 9094 9095 return service; 9096 9097 function getWebPageModel(pageRefId, pageRefType) { 9098 return $http.post("/main/getwebpagemodel", { pageRefId: pageRefId, pageRefType: pageRefType }).then( 9099 function (response) { 9100 return response.data.model; //WebPageViewModel.cs 9101 }, 9102 function errorCallback() { 9103 return undefined; 9104 }); 9105 } 9106} 9107 9108_webPageService.$inject = ["$http"];; 9109var _wishlistService = function ($http) { 9110 9111 var service = { 9112 getWishlist: getWishlist, 9113 getWishListModel: getWishListModel, 9114 updateQtyInWishList: updateQtyInWishList, 9115 wishlistMoveToCart: wishlistMoveToCart, 9116 wishlistAddProductToWishList: wishlistAddProductToWishList, 9117 wishlistCopyToCart: wishlistCopyToCart 9118 }; 9119 9120 return service; 9121 9122 function getWishlist() { 9123 return $http.get("/Wishlist/GetWishlist").then(function (response) { 9124 return response.data.wishlist; //CartModel 9125 }, function errorCallback() { 9126 return undefined; 9127 }); 9128 } 9129 9130 function getWishListModel(queryString) { // querystring drives the Guest View 9131 return $http.get("/wishlist/getwishlistmodel" + queryString).then(function (response) { 9132 return response.data.wishlistModel; //WishListModel 9133 }, function errorCallback() { 9134 return undefined; 9135 }); 9136 } 9137 9138 function updateQtyInWishList(id, qty, cqo) { 9139 return $http.post("/wishlist/updateqtyinwishlistjson", { entryId: id, qty: qty, cqo: cqo }).then( 9140 function (response) { 9141 return response.data; //anonymous object: bool success (hardcoded), CartModel 9142 }, 9143 function errorCallBack() { 9144 return undefined; 9145 } 9146 ); 9147 } 9148 9149 function wishlistMoveToCart(id) { 9150 return $http.post("/wishlist/movetocartjson", { entryId: id }).then( 9151 function (response) { 9152 return response.data; //anonymous object: bool success (hardcoded), CartModel wishlist, bool cart limit reached 9153 }, 9154 function errorCallBack() { 9155 return undefined; 9156 } 9157 ); 9158 } 9159 9160 function wishlistCopyToCart(promoCode, sku, quantity) { // guest view 9161 return $http.post("/wishlist/copytocartjson", { promoCode, sku, quantity }).then( 9162 function (response) { 9163 return response.data; //anonymous object: bool success (hardcoded), bool cart limit reached 9164 }, 9165 function errorCallBack() { 9166 return undefined; 9167 } 9168 ); 9169 } 9170 9171 function wishlistAddProductToWishList(productDataJson) { 9172 9173 return $http.post("/wishlist/addtowishlist", { data: productDataJson }).then( 9174 function (response) { 9175 return response.data; //anonymous object: bool success (hardcoded), string messages, string cartHtml, string personalizeHtml, bool maxLimitReached 9176 }, 9177 function errorCallBack() { 9178 return undefined; 9179 } 9180 ); 9181 } 9182} 9183 9184_wishlistService.$inject = ["$http"];; 9185var errorInterceptor = function ($injector) { 9186 return { 9187 response: function (response) { 9188 if (response.data == undefined || typeof response.data === "object") return response; 9189 9190 var html = new DOMParser().parseFromString(response.data, 'text/html'); 9191 if (html.body.classList.length) { 9192 html.body.classList.forEach(function (item) { 9193 switch (item) { 9194 case 'home': 9195 case 'error-page': 9196 case '404-page': 9197 { 9198 var logError = { 9199 Message: item === "home" ? "JSON WAF block" : "JSON Error Page", 9200 Error: "Angular $httpProvider json exception - " + response.config.url, 9201 FileName: "angular.tsgMvc.js.paul" //server side strips the extension... lets keep it here 9202 }; 9203 9204 var logService = $injector.get("_logService"); //circular dependency, so have to use service locator 9205 logService.error(logError); 9206 } 9207 } 9208 }); 9209 } 9210 9211 return response; 9212 } 9213 } 9214};; 9215var prevException = undefined; 9216var exceptionHandler = function ($injector) { 9217 return function customExceptionHandler(exception, cause) { 9218 //if its a re-occurring/looping error, don't log it multiple times to the server, just once 9219 if (prevException != undefined && exception.message === prevException.message) { 9220 return false; 9221 } 9222 9223 try { 9224 var logError = { 9225 Message: exception.message, 9226 Exception: exception.stack, //cant... waf gets triggered 9227 FileName: "angular.tsgMvc.js.paul" //server side strips the extension... lets keep it here 9228 }; 9229 9230 var log = $injector.get("$log"); 9231 var logService = $injector.get("_logService"); 9232 logService.error(logError); 9233 log.error(exception, cause); 9234 prevException = exception; 9235 } catch (e) { 9236 console.error(e); 9237 } 9238 } 9239};; 9240var requestInterceptor = function () { 9241 return { 9242 request: function (request) { 9243 if (request && request.url) request.url = request.url.toLowerCase(); 9244 return request; 9245 } 9246 } 9247};; 9248var youTubeApiService = function ($q, $window) { 9249 var deferred = $q.defer(); 9250 var apiReady = deferred.promise; 9251 9252 $window.onYouTubeIframeAPIReady = function () { 9253 deferred.resolve(); 9254 } 9255 9256 return { 9257 onReady: function (callback) { 9258 apiReady.then(callback); 9259 } 9260 } 9261}; 9262 9263youTubeApiService.$inject = ['$q','$window'];; 9264var accordionDirective = function () { 9265 return { 9266 restrict: 'A', 9267 link: function (scope, elem, attr) { 9268 angular.element(document).ready(function () { 9269 var content = elem[0].parentElement.querySelector("div[accordion-content]"); 9270 if (content == undefined) return false; 9271 9272 elem[0].setAttribute("aria-expanded", false); 9273 elem[0].setAttribute("aria-controls", content.getAttribute('id')); 9274 9275 angular.element(elem[0]).bind('click', function (e) { 9276 e.preventDefault(); 9277 9278 if (content.style.display === "none") { 9279 content.style.display = "block"; 9280 elem[0].classList.add('open'); 9281 elem[0].setAttribute("aria-expanded", true); 9282 } else { 9283 content.style.display = "none"; 9284 elem[0].classList.remove('open'); 9285 elem[0].setAttribute("aria-expanded", false); 9286 } 9287 }); 9288 }); 9289 } 9290 }; 9291};; 9292var addToCartDirective = function () { 9293 return { 9294 restrict: 'A', 9295 link: function (scope, elem, attrs) { 9296 //scope.data is ProductCartDataResponse.cs 9297 elem.bind('click', function () { 9298 if (!scope.data.SizeCode) 9299 scope.data.SizeCode = '000'; 9300 if (!scope.data.ColorCode) 9301 scope.data.ColorCode = '000'; 9302 return window.addItemToCartFamilyGroup(scope.data.ID, scope.data.PromoCode, scope.data.ColorCode, scope.data.SizeCode, 1, 9303 scope.data.FreeGiftItemId, scope.data.FreeGiftPromoCode, scope.data.FreeGiftOfferID, false); 9304 }); 9305 } 9306 }; 9307};
9308var addToWishlistDirective = ['_userService', function (_userService) { 9309 return { 9310 restrict: 'A', 9311 link: function (scope, elem, attrs) { 9312 //scope.data is ProductCartDataResponse.cs 9313 elem.bind('click', function(e) { 9314 return _userService.getUserInfo().then(function(info) { 9315 var cartItem = { ID: scope.data.ID, PromoCode: scope.data.PromoCode, ColorCode: scope.data.ColorCode, SizeCode: scope.data.SizeCode, Quantity: 1 }; 9316 Gorilla.util.setCookie('_wishlist-product-data', btoa(JSON.stringify(cartItem))); 9317 9318 if (!info.SignedIn) return window.location = "/authenticate/accountlogin?returnUrl=/wishlist/index"; 9319 return window.location = "/wishlist/index"; 9320 }); 9321 }); 9322 } 9323 }; 9324}]; 9325var algoliaInsightDirective = ['_algoliaService', function (_algoliaService) { 9326 return { 9327 restrict: 'A', 9328 9329 scope: { 9330 cost: "@", 9331 pid: "@", 9332 pos: "@", 9333 queryid: "@", 9334 eventname: "@" 9335 }, 9336 9337 link: function (scope, elem, attr) { 9338 elem.bind('click', function () { 9339 _algoliaService.sendAlgoliaInsightProductClick(scope.pid, scope.pos, scope.queryid, scope.eventname, scope.cost); 9340 }); 9341 } 9342 }; 9343}];; 9344var bindTemplateDirective = function () { 9345 return { 9346 restrict: 'A', 9347 scope: { data: '=bindTemplateTo' }, //isolated... 9348 templateUrl: function (element, attr) { return attr.templateUrl; } 9349 }; 9350};
9351var cfVideoDirective = ['$window', '$timeout', '$sce', '$mdDialog', '_mediaService', function ($window, $timeout, $sce, $mdDialog, _mediaService) { 9352 return { 9353 restrict: 'A', 9354 link: function (scope, elem, attrs) { 9355 scope.track = undefined; 9356 scope.video = undefined; 9357 scope.ccVisible = undefined; 9358 scope.tpmMedia = undefined; 9359 scope.tpmAudio = undefined; 9360 9361 var clickFn = function (e) { 9362 e.preventDefault(); 9363 if (attrs.cfVideo == undefined) return false; 9364 9365 var videoWidth = $window.innerWidth > 680 ? 600 : $window.innerWidth - 80; 9366 scope.videoScript = $sce.trustAsHtml('<stream id="sg-stream" src="' + attrs.cfVideo + '" controls preload width="' + videoWidth + 'px"></stream>' + 9367 '<script data-cfasync="false" defer type="text/javascript" src="https://embed.cloudflarestream.com/embed/r4xu.fla9.latest.js?video=' + 9368 attrs.cfVideo + '"></script>'); 9369 9370 scope.modal = { 9371 title: attrs.cfTitle, 9372 customCssClass: "cf-video", 9373 templateUrl: "/templates/pdp/video.html" 9374 } 9375 9376 return $mdDialog.show($mdDialog.modal({ 9377 scope: scope, 9378 onComplete: function(scope, modalEl) { 9379 var ifr = modalEl[0].querySelector('iframe'); 9380 if (ifr) ifr.setAttribute('title', attrs.cfTitle); 9381 9382 if (scope.tpmAudio && scope.tpmAudio > 0 && scope.tpmMedia && scope.tpmMedia > 0) { 9383 var audioDescDiv = document.createElement('div'); 9384 audioDescDiv.classList = 'tpm-control'; 9385 var audioButton = document.createElement('button'); 9386 audioButton.type = 'button'; 9387 audioButton.title = 'Audio Description'; 9388 audioButton.name = 'AudioDescription'; 9389 audioButton.setAttribute('aria-disabled', 'false'); 9390 audioButton.innerHTML = '<img src="/images/product/adlogo.jpg" class="adBtnImg" alt="Audio Description">'; 9391 9392 var layout = document.querySelector('#videoLayout'); 9393 audioButton.addEventListener('click', function () { 9394 var cfVideo = document.querySelector('#cfVideoScript'); 9395 layout.removeChild(cfVideo); 9396 var audioDiv = document.querySelector('.tpm-control'); 9397 layout.removeChild(audioDiv); 9398 9399 var iFrameWidth = $window.innerWidth > 680 ? 600 : $window.innerWidth - 80; 9400 var iFrameHeight = iFrameWidth * ($window.innerWidth > 680 ? 0.65 : 0.75); 9401 var playerWidth = iFrameWidth; 9402 var playerHeight = iFrameHeight * 0.9; 9403 iFrameWidth += 'px'; 9404 iFrameHeight += 'px'; 9405 playerWidth += 'px'; 9406 playerHeight += 'px'; 9407 9408 var tpmIFrame = document.createElement('iframe'); 9409 tpmIFrame.marginWidth = '0px'; 9410 tpmIFrame.marginheight = '0px'; 9411 tpmIFrame.width = iFrameWidth; 9412 tpmIFrame.height = iFrameHeight; 9413 tpmIFrame.frameBorder = '0'; 9414 tpmIFrame.src = '//plugin.3playmedia.com/show?ad=1&ad_autoplay=1&embed=iframe&height=' + playerHeight + '&mf=' + scope.tpmMedia + '&p3sdk_version=1.10.7&p=55037&player_type=videojs&plugin_skin=light&video_src=3play%3A%2F%2F' + scope.tpmMedia + '&width=' + playerWidth; 9415 9416 if (layout) layout.appendChild(tpmIFrame); 9417 }); 9418 9419 audioDescDiv.appendChild(audioButton); 9420 if (layout) document.querySelector('#videoLayout').appendChild(audioDescDiv); 9421 } 9422 }, 9423 onRemoving: function () { elem.focus(); } 9424 })); 9425 } 9426 9427 //give slick plenty of time to finish 9428 $timeout(function () { elem.bind('click', clickFn); }, 1000); 9429 angular.element($window).bind('resize', function () { 9430 $timeout(function () { 9431 elem.unbind('click', clickFn); 9432 elem.bind('click', clickFn); 9433 }, 1000); 9434 }); 9435 9436 $timeout(function () { 9437 if (attrs.cfVideo == undefined) return false; 9438 9439 return _mediaService.get3PlayMedia(attrs.cfVideo).then(function (threePlay) { 9440 if (threePlay == undefined) return false; 9441 scope.tpmMedia = threePlay.MediaId; 9442 scope.tpmAudio = threePlay.AudioId; 9443 }); 9444 }, 50); 9445 9446 //TODO uncomment this to start doing captions once we are ready 9447// scope.$watch("videoScript", function (value) { 9448// if (value == undefined) return false; 9449// scope.loadCaptions(); 9450// }); 9451 9452 scope.closeDialog = function () { 9453 $mdDialog.hide(); 9454 scope.modal = undefined; 9455 scope.videoScript = undefined; 9456 scope.track = undefined; 9457 scope.video = undefined; 9458 scope.ccVisible = undefined; 9459 } 9460 9461 scope.loadCaptions = function () { 9462 scope.video = document.querySelector('.vjs-tech'); 9463 if (!scope.video) { 9464 $timeout(scope.loadCaptions, 100); 9465 return; 9466 } 9467 9468 scope.video.setAttribute('crossorigin', 'anonymous'); 9469 scope.video.addEventListener('loadedmetadata', function () { 9470 // create a new track and populate attributes 9471 scope.track = document.createElement('track'); 9472 scope.track.kind = 'captions'; 9473 scope.track.label = 'English'; 9474 scope.track.srclang = 'en'; 9475 scope.track.setAttribute('default', 'default'); 9476 scope.track.src = 'https://image.sportsmansguide.com/image/videos/' + attrs.cfVideo + '.vtt'; 9477 9478 scope.track.addEventListener('load', function () { 9479 scope.track.mode = 'hidden'; 9480 scope.video.textTracks[0].mode = 'hidden'; 9481 scope.ccVisible = false; 9482 scope.addCCButton(); 9483 }); 9484 9485 scope.video.appendChild(scope.track); 9486 }); 9487 } 9488 9489 scope.addCCButton = function () { 9490 var control = document.createElement('div'); 9491 control.classList = 'vjs-control-cc vjs-menu-button vjs-control vjs-button'; 9492 9493 var button = document.createElement('button'); 9494 button.classList = 'vjs-control-cc-button vjs-menu-button vjs-button'; 9495 button.type = 'button'; 9496 button.title = 'Closed Captions'; 9497 button.name = 'ClosedCaptions'; 9498 button.setAttribute('aria-disabled', 'false'); 9499 button.innerHTML = 'cc'; 9500 9501 control.appendChild(button); 9502 9503 // Toggle subs on/off. Handles click and Enter key. 9504 button.addEventListener('click', function () { 9505 scope.ccVisible = !scope.ccVisible; 9506 scope.video.textTracks[0].mode = scope.ccVisible ? 'showing' : 'hidden'; 9507 }); 9508 9509 // add the control 9510 var controlBar = document.querySelector('.vjs-control-bar'); 9511 if (controlBar) document.querySelector('.vjs-control-bar').appendChild(control); 9512 } 9513 } 9514 }; 9515}];; 9516var clickOutsideDirective = ['$document', function ($document) { 9517 return { 9518 restrict: 'A', 9519 scope: { 9520 clickOutside: '&' 9521 }, 9522 link: function (scope, el, attr) { 9523 9524 $document.on('click', function (e) { 9525 if (el !== e.target && !el[0].contains(e.target)) { 9526 scope.$apply(function () { 9527 scope.$eval(scope.clickOutside); 9528 }); 9529 } 9530 }); 9531 } 9532 } 9533 9534}];; 9535var closeModalMatDirective = ['$mdDialog', '$document', function ($mdDialog, $document) { 9536 9537 return { 9538 restrict: 'A', 9539 link: function (scope, el, attr) { 9540 el.on('click', function (e) { 9541 if (e.target == el[0]) { 9542 $mdDialog.hide(); 9543 var isInCheckout = window.location.href.includes('checkout') ? true : false; 9544 if (isInCheckout && scope !== undefined) { 9545 scope.nextStep(); 9546 } 9547 } 9548 }) 9549 } 9550 } 9551}];; 9552var clubPriceDirective = ['$window', '_clubService', function ($window, _clubService) { 9553 return { 9554 restrict: "E", 9555 9556 scope: { 9557 clubsku: "@", 9558 clubpromocode: "@", 9559 clubCost: "@" 9560 }, 9561 9562 template: '{{clubCost}}', 9563 9564 link: function (scope) { 9565 _clubService.getClubInfo(scope.clubpromocode, scope.clubsku).then(function (result) { 9566 if (result.ActualClubCost == "0.00") 9567 scope.clubCost = "Free"; 9568 else 9569 scope.clubCost = "$" + result.ActualClubCost; 9570 }); 9571 } 9572 9573 }; 9574}];; 9575var elementReadyDirective = ['$timeout', '$rootScope', function ($timeout, $rootScope) { 9576 return { 9577 restrict: 'A', 9578 link: function(scope, element, attrs) { 9579 $timeout(function() { 9580 element.ready(function() { 9581 scope.$apply(function () { 9582 $rootScope.$broadcast(attrs.elementReady + ":ready"); 9583 }); 9584 }); 9585 }); 9586 } 9587 }; 9588}];; 9589var focusElementDirective = function () { 9590 return { 9591 restrict: 'A', 9592 link: function (scope, element, attrs) { 9593 scope.$watch(attrs.focusElement, function (value) { 9594 if (value === true) { 9595 element[0].focus(); 9596 } 9597 }); 9598 } 9599 }; 9600};
9601//form model binding 9602var formModelDirective = function () { 9603 'use strict'; 9604 return { 9605 restrict: 'A', 9606 require: 'form', 9607 compile: function (element, attr) { 9608 var inputs = element.find('input'); 9609 for (var i = 0; i < inputs.length; i++) { 9610 var input = inputs.eq(i); 9611 if (input.attr('name')) { 9612 input.attr('ng-model', attr.formModel + '.' + input.attr('name')); 9613 } 9614 } 9615 } 9616 }; 9617}; 9618var zipUsDirective = function () { 9619 return { 9620 restrict: 'A', 9621 require: '?ngModel', 9622 link: function (scope, elem, attr, ctrl) { 9623 if (!ctrl) return; 9624 ctrl.$validators.zipus = function (modelVal, viewVal) { 9625 var regexp = /^[0-9]{5}(-?[0-9]{4})?$/; 9626 return regexp.test(viewVal); 9627 }; 9628 } 9629 }; 9630} 9631 9632var zipCaDirective = function () { 9633 return { 9634 restrict: 'A', 9635 require: '?ngModel', 9636 link: function (scope, elem, attr, ctrl) { 9637 if (!ctrl) return; 9638 ctrl.$validators.zipca = function (modelVal, viewVal) { 9639 var regexp = /^[a-zA-Z][0-9][a-zA-Z] *[0-9][a-zA-Z][0-9]$/; 9640 return regexp.test(viewVal); 9641 }; 9642 } 9643 }; 9644} 9645 9646var phoneDirective = function () { 9647 return { 9648 restrict: 'A', 9649 require: '?ngModel', 9650 link: function (scope, elem, attr, ctrl) { 9651 if (!ctrl) return; 9652 ctrl.$validators.phone = function (modelVal, viewVal) { 9653 var regexp = /^(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/; 9654 return regexp.test(viewVal); 9655 }; 9656 } 9657 }; 9658} 9659 9660var phoneCustomDirective = function () { 9661 return { 9662 restrict: 'A', 9663 require: '?ngModel', 9664 link: function (scope, elem, attr, ctrl) { 9665 if (!ctrl) return; 9666 ctrl.$validators.phoneCustom = function (modelVal, viewVal) { 9667 if (viewVal === "(213)442-1463" || viewVal === "(415)419-8616" || viewVal === "(602)671-6610" || viewVal === "(619)854-2705") return false; 9668 return true; 9669 }; 9670 } 9671 }; 9672} 9673 9674var phoneIntlDirective = function () { 9675 return { 9676 restrict: 'A', 9677 require: '?ngModel', 9678 link: function (scope, elem, attr, ctrl) { 9679 if (!ctrl) return; 9680 ctrl.$validators.phoneintl = function (modelVal, viewVal) { 9681 var regexp = /^\d{10,15}$/; 9682 return regexp.test(viewVal); 9683 }; 9684 } 9685 }; 9686} 9687 9688var emailDirective = function () { 9689 return { 9690 restrict: 'A', 9691 require: '?ngModel', 9692 link: function (scope, elem, attr, ctrl) { 9693 if (!ctrl) return; 9694 ctrl.$validators.email = function (modelVal, viewVal) { 9695 var regexp = /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i; 9696 return regexp.test(viewVal); 9697 }; 9698 } 9699 }; 9700} 9701 9702var euEmailDirective = function () { 9703 return { 9704 restrict: 'A', 9705 require: '?ngModel', 9706 link: function (scope, elem, attr, ctrl) { 9707 if (!ctrl) return; 9708 ctrl.$validators.euemail = function (modelVal, viewVal) { 9709 var regexp = /(\.(ad|at|be|bg|hr|cy|cz|dk|ee|fi|fr|de|gr|gp|va|hu|ie|im|it|lv|lt|lu|mt|mq|mc|nl|pl|pt|ro|sk|si|es|bl|mf|se|gb|uk|eu))$/i; 9710 return !regexp.test(viewVal); 9711 }; 9712 } 9713 }; 9714} 9715 9716var passwordInputDirective = function () { 9717 return { 9718 restrict: 'A', 9719 require: '?ngModel', 9720 link: function (scope, elem, attr, ctrl) { 9721 if (!ctrl) return; 9722 ctrl.$validators.passwordInput = function (modelVal, viewVal) { 9723 var regexp = /^.*(?=.{8,})(?=.*[\d\W]).*$/; 9724 return regexp.test(viewVal); 9725 } 9726 } 9727 }; 9728} 9729 9730var passwordMatchDirective = function () { 9731 return { 9732 restrict: 'A', 9733 require: '?ngModel', 9734 link: function (scope, elem, attrs, ngModel) { 9735 if (!ngModel) return; 9736
9737 var validate = function () { 9738 var val1 = ngModel.$viewValue; 9739 var val2 = attrs.passwordMatch; 9740 ngModel.$setValidity('passwordMatch', val1 === val2); 9741 }; 9742 9743 scope.$watch(attrs.ngModel, function () { validate(); }); 9744 attrs.$observe('passwordMatch', function (val) { validate(); }); 9745 } 9746 } 9747} 9748 9749var numericDirective = function() { 9750 return { 9751 restrict: 'A', 9752 require: '?ngModel', 9753 link: function (scope, elem, attr, ctrl) { 9754 if (!ctrl) return; 9755 ctrl.$validators.numeric = function (modelVal, viewVal) { 9756 return !isNaN(viewVal); 9757 } 9758 } 9759 }; 9760} 9761 9762var numericNoDecimalsDirective = function () { 9763 return { 9764 restrict: 'A', 9765 require: '?ngModel', 9766 link: function (scope, elem, attr, ctrl) { 9767 if (!ctrl) return; 9768 ctrl.$validators.numericNoDecimals = function (modelVal, viewVal) { 9769 if (!viewVal) return true; 9770 var regexp = /\D/; 9771 return !regexp.test(viewVal.trim()); 9772 } 9773 } 9774 }; 9775};
9776var infoWindowDirective = function () { 9777 return { 9778 restrict: 'E', 9779 templateUrl: '/templates/checkout/infowindow.html' 9780 } 9781};; 9782var loadingDirective = ['$http', function ($http) { 9783 return { 9784 restrict: 'A', 9785 link: function (scope, elm) { 9786 scope.loading = function () { 9787 //ensure other loading modules are filtered out 9788 return $http.pendingRequests.length > 0 && 9789 !scope.inlineLoading && 9790 !scope.modalLoading && 9791 !scope.estShipLoading && 9792 !scope.certonaLoading && 9793 !scope.pageLoading; 9794 }; 9795 9796 scope.$watch(scope.loading, function (viz) { 9797 if (elm == undefined || typeof elm.show !== 'function' || typeof elm.hide !== 'function') return false; 9798 viz ? elm.show() : elm.hide(); 9799 }); 9800 } 9801 }; 9802}]; 9803var navUrlDirective = ['$window', function ($window) { 9804 return { 9805 restrict: 'A', 9806 link: function (scope, elem, attrs) { 9807 elem.bind('click', function () { 9808 return $window.location.href = attrs.navUrl; 9809 }); 9810 } 9811 }; 9812}];; 9813var notifyMeDirective = function () { 9814 return { 9815 restrict: 'A', 9816 link: function (scope, elem, attrs) { 9817 //scope.data is ProductCartDataResponse.cs 9818 elem.bind('click', function() { 9819 return window.notifyMeFamilyGroup(scope.data.PromoCode, scope.data.ID, scope.data.Name, '000', '000'); 9820 }); 9821 9822 } 9823 }; 9824};
9825var mobileOnlyDirective = ['$window', '$timeout', function($window, $timeout) { 9826 return { 9827 restrict: 'A', 9828 link: function(scope, elem, attr) { 9829 elem.hide(); 9830 $timeout(function () { 9831 $window.innerWidth <= 960 ? elem.show() : elem.hide(); 9832 }, 250); 9833 } 9834 }; 9835}]; 9836 9837var fabletOnlyDirective = ['$window', '$timeout', function ($window, $timeout) { 9838 return { 9839 restrict: 'A', 9840 link: function (scope, elem, attr) { 9841 elem.hide(); 9842 $timeout(function () { 9843 $window.innerWidth <= 680 ? elem.show() : elem.hide(); 9844 }, 250); 9845 } 9846 }; 9847}]; 9848 9849var tabletDesktopOnlyDirective = ['$window', '$timeout', function ($window, $timeout) { 9850 return { 9851 restrict: 'A', 9852 link: function (scope, elem, attr) { 9853 elem.hide(); 9854 $timeout(function () { 9855 $window.innerWidth > 680 ? elem.show() : elem.hide(); 9856 }, 250); 9857 } 9858 }; 9859}]; 9860 9861var desktopOnlyDirective = ['$window', '$timeout', function ($window, $timeout) { 9862 return { 9863 restrict: 'A', 9864 link: function (scope, elem, attr) { 9865 elem.hide(); 9866 $timeout(function () { 9867 $window.innerWidth > 960 ? elem.show() : elem.hide(); 9868 }, 250); 9869 } 9870 }; 9871}];; 9872var restrictedCharactersDirective = [function () { 9873 return { 9874 restrict: 'A', 9875 require: '?ngModel', 9876 link: function (scope, elem, attrs, ngModel) { 9877 if (!ngModel) return; 9878 9879 // default restricted characters 9880 var defaultForbidden = '~`!@#$%^&*()_-+=\\{\\}\\[\\]:;"\'|\\\\<>,\\.\\?\\/'; 9881 9882 // can add a list of restricted characters via the 'restrict-chars-list' attribute on the element to use instead of the default list 9883 var forbiddenSource = (typeof attrs.restrictCharsList !== 'undefined') 9884 ? attrs.restrictCharsList 9885 : defaultForbidden; 9886 9887 forbiddenSource = (forbiddenSource == null ? '' : forbiddenSource).toString().trim(); 9888 function escapeForRegex(s) { 9889 return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); 9890 } 9891 9892 var escaped = forbiddenSource.length ? escapeForRegex(forbiddenSource) : ''; 9893 var forbiddenRegex = escaped.length ? new RegExp('[' + escaped + ']', 'g') : null; 9894 var forbiddenTestRegex = escaped.length ? new RegExp('[' + escaped + ']') : null; 9895 9896 // remove any character outside printable ASCII (allow only U+0020...U+007E) 9897 var nonPrintableRemoveRegex = /[^\x20-\x7E]/g; 9898 var nonPrintableTestRegex = /[^\x20-\x7E]/; 9899 9900 ngModel.$parsers.push(function (value) { 9901 if (!value) return value; 9902 var cleaned = value.replace(nonPrintableRemoveRegex, ''); 9903 if (forbiddenRegex) { 9904 cleaned = cleaned.replace(forbiddenRegex, ''); 9905 } 9906 9907 if (cleaned !== value) { 9908 ngModel.$setViewValue(cleaned); 9909 ngModel.$render(); 9910 } 9911 9912 return cleaned; 9913 }); 9914 9915 // block keypress before it even appears 9916 elem.on('keypress', function (e) { 9917 var code = e.which || e.keyCode; 9918 if (!code) return; 9919 9920 if (e.ctrlKey || e.metaKey) return; 9921 9922 var char = String.fromCharCode(code); 9923 if ((forbiddenTestRegex && forbiddenTestRegex.test(char)) || nonPrintableTestRegex.test(char)) { 9924 e.preventDefault(); 9925 } 9926 }); 9927 } 9928 }; 9929}];; 9930var scrollToDirective = ['$timeout', function ($timeout) { 9931 return { 9932 restrict: 'A', 9933 link: function (scope, elem, attrs) { 9934 $timeout(function() { 9935 if (attrs.scrollTo == undefined) return false; 9936 var content = document.getElementById(attrs.scrollTo); 9937 if (content == null) return false; 9938 9939 angular.element(elem[0]).bind('click', function (e) { 9940 e.preventDefault(); 9941 var header = document.querySelector("header.site-header"); 9942 $('html, body').animate({ 9943 scrollTop: content.getBoundingClientRect().top - header.getBoundingClientRect().bottom 9944 }, 350); 9945 }); 9946 }, 500); 9947 } 9948 }; 9949}];; 9950//this uses the gorilla moby, not the material one, as thats not included on all pages yet for performance 9951var showModalDirective = function () { 9952 return { 9953 restrict: 'A', 9954 link: function(scope, elem, attrs) { 9955 elem.on('click', function(e){
9956 e.preventDefault(); 9957 9958 $("#site-promo-modal").html(attrs.showModal); 9959 $("#site-promo-modal-trigger").moby({ 9960 'ariaLabelText': 'Modal', 9961 'onCompleteCallback': function () { 9962 $(".moby-close").on('click', function (event) { 9963 event.preventDefault(); 9964 $("#site-promo-modal-trigger").moby('hide'); 9965 }); 9966 } 9967 }).moby('show', '#site-promo-modal'); 9968 }); 9969 } 9970 }; 9971}; 9972var togglePanelDirective = ['$mdPanel', function($mdPanel) { 9973 return { 9974 restrict: 'A', 9975 link: function (scope, elem, attrs) { 9976 elem.bind('click', function (e) { 9977 var position = $mdPanel.newPanelPosition().relativeTo(elem) 9978 .addPanelPosition($mdPanel.xPosition.ALIGN_START, $mdPanel.yPosition.BELOW); 9979 9980 var config = { 9981 attachTo: angular.element(document.body), 9982 contentElement: document.getElementById(attrs.togglePanel), 9983 position: position, 9984 clickOutsideToClose: true, 9985 escapeToClose: true, 9986 focusOnOpen: false, 9987 groupName: 'pseudoSelects', 9988 onOpenComplete: function () { 9989 document.querySelectorAll("._md-panel-sh
9989own #" + attrs.togglePanel + " a")[0].focus(); 9990 }, 9991 origin: elem, 9992 trapFocus: true 9993 }; 9994 9995 $mdPanel.open(config).then(function(panelRef) { 9996 scope.panelRef = panelRef; 9997 9998 var anchors = document.querySelectorAll("._md-panel-shown #" + attrs.togglePanel + " a"), 9999 clickFn = function () { 10000 [].map.call(anchors, function() { 10001 scope.panelRef && 10002 scope.panelRef.close().then(function () { 10003 scope.panelRef.destroy(); 10004 elem.focus(); 10005 }); 10006 }); 10007 }, 10008 keyDownFn = function (e) { 10009 var handled, index, prevIndex, nextIndex; 10010 switch (e.which) { 10011 case 38: // Up Arrow. 10012 index = Array.prototype.indexOf.call(anchors, e.target); 10013 prevIndex = (index + anchors.length - 1) % anchors.length; 10014 anchors[prevIndex].focus(); 10015 handled = true; 10016 break; 10017 10018 case 40: // Down Arrow. 10019 index = Array.prototype.indexOf.call(anchors, e.target); 10020 nextIndex = (index + 1) % anchors.length; 10021 anchors[nextIndex].focus(); 10022 handled = true; 10023 break; 10024 10025 case 13: // Enter. 10026 case 32: // Space. 10027 index = Array.prototype.indexOf.call(anchors, e.target); 10028 anchors[index].click(); 10029 elem.focus(); 10030 handled = true; 10031 break; 10032 10033 case 9: // Tab. 10034 scope.panelRef && 10035 scope.panelRef.close().then(function () { 10036 scope.panelRef.destroy(); 10037 }); 10038 } 10039 10040 if (handled) { 10041 e.preventDefault(); 10042 e.stopImmediatePropagation(); 10043 } 10044 }; 10045 10046 [].map.call(anchors, function (el) { el.addEventListener("click", clickFn, false); });
10047 document.querySelectorAll("._md-panel-shown #" + attrs.togglePanel + " a").forEach(function(anchor) { 10048 anchor.addEventListener("keydown", keyDownFn, false); 10049 }); 10050 10051 }); 10052 }); 10053 } 10054 }; 10055}];; 10056var toggleSidenavDirective = ['$mdSidenav', function ($mdSidenav) { 10057 return { 10058 restrict: 'A', 10059 link: function (scope, elem, attrs) { 10060 elem.bind('click', function () { 10061 if (attrs.toggleSidenav == undefined) return false; 10062 $mdSidenav(attrs.toggleSidenav).toggle(); 10063 }); 10064 10065 } 10066 }; 10067}];; 10068var toggleWarrantyDirective = ['_cartService', function (_cartService) { 10069 return { 10070 restrict: 'A', 10071 link: function (scope, elem, attrs) { 10072 //scope.data is CartEntry.cs 10073 elem.bind('click', function () { 10074 return _cartService.modifyCartWarranty(scope.data.CartItemEntryId, !scope.data.addWarranty).then(function (success) { 10075 if (success) { 10076 var controllerEl = angular.element('#ViewCartController'); 10077 if (controllerEl != undefined) { 10078 var cartScope = controllerEl.scope(); 10079 cartScope.getCart(); 10080 } 10081 } 10082 }); 10083 }); 10084 } 10085 }; 10086}];; 10087var youtubeDirective = ['$window', 'youTubeApiService', function ($window, youTubeApiService) { 10088 return { 10089 restrict: "E", 10090 10091 scope: { 10092 height: "@", 10093 width: "@", 10094 videoid: "@" 10095 }, 10096 10097 template: '<div></div>', 10098 10099 link: function (scope, element) { 10100 var tag = document.createElement('script'); 10101 tag.src = "https://www.youtube.com/iframe_api"; 10102 var firstScriptTag = document.getElementsByTagName('script')[0]; 10103 firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); 10104 10105 var player; 10106 10107 youTubeApiService.onReady(function () { 10108 player = setupPlayer(scope, element); 10109 }); 10110 10111 function setupPlayer(scope, element) { 10112 return new YT.Player(element.children()[0], { 10113 playerVars: { 10114 autoplay: 0, 10115 html5: 1, 10116 theme: "light", 10117 modestbranding: 1, 10118 color: "white", 10119 iv_load_policy: 3, 10120 showinfo: 1, 10121 controls: 1 10122 }, 10123 height: scope.height, 10124 width: scope.width, 10125 videoId: scope.videoid 10126 }); 10127 } 10128 10129 scope.$watch('videoid', function (newValue, oldValue) { 10130 if (newValue == oldValue) { 10131 return; 10132 } 10133 10134 player.cueVideoById(scope.videoid); 10135 10136 }); 10137 10138 scope.$watch('height + width', function (newValue, oldValue) { 10139 if (newValue == oldValue) { 10140 return; 10141 } 10142 10143 player.setSize(scope.width, scope.height); 10144 10145 }); 10146 } 10147 }; 10148}];; 10149!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var H;function f(){return H.apply(null,arguments)}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function F(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function L(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var t in e)if(c(e,t))return;return 1}function o(e){return void 0===e}function u(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function V(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function G(e,t){for(var n=[],s=e.length,i=0;i<s;++i)n.push(t(e[i],i));return n}function E(e,t){for(var n in t)c(t,n)&&(e[n]=t[n]);return c(t,"toString")&&(e.toString=t.toString),c(t,"valueOf")&&(e.valueOf=t.valueOf),e}function l(e,t,n,s){return Pt(e,t,n,s,!0).utc()}function m(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invali
vendor: 7,452 bytes, line 10149
10149dMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function A(e){if(null==e._isValid){var t=m(e),n=j.call(t.parsedDateParts,function(e){return null!=e}),n=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(n=n&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return n;e._isValid=n}return e._isValid}function I(e){var t=l(NaN);return null!=e?E(m(t),e):m(t).userInvalidated=!0,t}var j=Array.prototype.some||function(e){for(var t=Object(this),n=t.length>>>0,s=0;s<n;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1},Z=f.momentProperties=[],z=!1;function $(e,t){var n,s,i,r=Z.length;if(o(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),o(t._i)||(e._i=t._i),o(t._f)||(e._f=t._f),o(t._l)||(e._l=t._l),o(t._strict)||(e._strict=t._strict),o(t._tzm)||(e._tzm=t._tzm),o(t._isUTC)||(e._isUTC=t._isUTC),o(t._offset)||(e._offset=t._offset),o(t._pf)||(e._pf=m(t)),o(t._locale)||(e._locale=t._locale),0<r)for(n=0;n<r;n++)o(i=t[s=Z[n]])||(e[s]=i);return e}function q(e){$(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===z&&(z=!0,f.updateOffset(this),z=!1)}function h(e){return e instanceof q||null!=e&&null!=e._isAMomentObject}function B(e){!1===f.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function e(r,a){var o=!0;return E(function(){if(null!=f.deprecationHandler&&f.deprecationHandler(null,r),o){for(var e,t,n=[],s=arguments.length,i=0;i<s;i++){if(e="","object"==typeof arguments[i]){for(t in e+="\n["+i+"] ",arguments[0])c(arguments[0],t)&&(e+=t+": "+arguments[0][t]+", ");e=e.slice(0,-2)}else e=arguments[i];n.push(e)}B(r+"\nArguments: "+Array.prototype.slice.call(n).join("")+"\n"+(new Error).stack),o=!1}return a.apply(this,arguments)},a)}var J={};function Q(e,t){null!=f.deprecationHandler&&f.deprecationHandler(e,t),J[e]||(B(t),J[e]=!0)}function d(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function X(e,t){var n,s=E({},e);for(n in t)c(t,n)&&(F(e[n])&&F(t[n])?(s[n]={},E(s[n],e[n]),E(s[n],t[n])):null!=t[n]?s[n]=t[n]:delete s[n]);for(n in e)c(e,n)&&!c(t,n)&&F(e[n])&&(s[n]=E({},s[n]));return s}function K(e){null!=e&&this.set(e)}f.suppressDeprecationWarnings=!1,f.deprecationHandler=null;var ee=Object.keys||function(e){var t,n=[];for(t in e)c(e,t)&&n.push(t);return n};function r(e,t,n){var s=""+Math.abs(e);return(0<=e?n?"+":"":"-")+Math.pow(10,Math.max(0,t-s.length)).toString().substr(1)+s}var te=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ne=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,se={},ie={};function s(e,t,n,s){var i="string"==typeof s?function(){return this[s]()}:s;e&&(ie[e]=i),t&&(ie[t[0]]=function(){return r(i.apply(this,arguments),t[1],t[2])}),n&&(ie[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function re(e,t){return e.isValid()?(t=ae(t,e.localeData()),se[t]=se[t]||function(s){for(var e,i=s.match(te),t=0,r=i.length;t<r;t++)ie[i[t]]?i[t]=ie[i[t]]:i[t]=(e=i[t]).match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"");return function(e){for(var t="",n=0;n<r;n++)t+=d(i[n])?i[n].call(e,s):i[n];return t}}(t),se[t](e)):e.localeData().invalidDate()}function ae(e,t){var n=5;function s(e){return t.longDateFormat(e)||e}for(ne.lastIndex=0;0<=n&&ne.test(e);)e=e.replace(ne,s),ne.lastIndex=0,--n;return e}var oe={};function t(e,t){var n=e.toLowerCase();oe[n]=oe[n+"s"]=oe[t]=e}function _(e){return"string"==typeof e?oe[e]||oe[e.toLowerCase()]:void 0}function ue(e){var t,n,s={};for(n in e)c(e,n)&&(t=_(n))&&(s[t]=e[n]);return s}var le={};function n(e,t){le[e]=t}function he(e){return e%4==0&&e%100!=0||e%400==0}function y(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function g(e){var e=+e,t=0;return t=0!=e&&isFinite(e)?y(e):t}function de(t,n){return function(e){return null!=e?(fe(this,t,e),f.updateOffset(this,n),this):ce(this,t)}}function ce(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function fe(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&he(e.year())&&1===e.month()&&29===e.date()?(n=g(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),We(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}var i=/\d/,w=/\d\d/,me=/\d{3}/,_e=/\d{4}/,ye=/[+-]?\d{6}/,p=/\d\d?/,ge=/\d\d\d\d?/,we=/\d\d\d\d\d\d?/,pe=/\d{1,3}/,ke=/\d{1,4}/,ve=/[+-]?\d{1,6}/,Me=/\d+/,De=/[+-]?\d+/,Se=/Z|[+-]\d\d:?\d\d/gi,Ye=/Z|[+-]\d\d(?::?\d\d)?/gi,k=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function v(e,n,s){be[e]=d(n)?n:function(e,t){return e&&s?s:n}}function Oe(e,t){return c(be,e)?be[e](t._strict,t._locale):new RegExp(M(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,s,i){return t||n||s||i})))}function M(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var be={},xe={};function D(e,n){var t,s,i=n;for("string"==typeof e&&(e=[e]),u(n)&&(i=function(e,t){t[n]=g(e)}),s=e.length,t=0;t<s;t++)xe[e[t]]=i}function Te(e,i){D(e,function(e,t,n,s){n._w=n._w||{},i(e,n._w,n,s)})}var S,Y=0,O=1,b=2,x=3,T=4,N=5,Ne=6,Pe=7,Re=8;function We(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=(t%(n=12)+n)%n;return e+=(t-n)/12,1==n?he(e)?29:28:31-n%7%2}S=Array.prototype.indexOf||function(e){for(var t=0;t<this.length;++t)if(this[t]===e)return t;return-1},s("M",["MM",2],"Mo",function(){return this.month()+1}),s("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),s("MMMM",0,0,function(e){return this.localeData().months(this,e)}),t("month","M"),n("month",8),v("M",p),v("MM",p,w),v("MMM",function(e,t){return t.monthsShortRegex(e)}),v("MMMM",function(e,t){return t.monthsRegex(e)}),D(["M","MM"],function(e,t){t[O]=g(e)-1}),D(["MMM","MMMM"],function(e,t,n,s){s=n._locale.monthsParse(e,s,n._strict);null!=s?t[O]=s:m(n).invalidMonth=e});var Ce="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ue="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),He=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Fe=k,Le=k;function Ve(e,t){var n;if(e.isValid()){if("string"==typeof t)if(/^\d+$/.test(t))t=g(t);else if(!u(t=e.localeData().monthsParse(t)))return;n=Math.min(e.date(),We(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n)}}function Ge(e){return null!=e?(Ve(this,e),f.updateOffset(this,!0),this):ce(this,"Month")}function Ee(){function e(e,t){return t.length-e.length}for(var t,n=[],s=[],i=[],r=0;r<12;r++)t=l([2e3,r]),n.push(this.monthsShort(t,"")),s.push(this.months(t,"")),i.push(this.months(t,"")),i.push(this.monthsShort(t,""));for(n.sort(e),s.sort(e),i.sort(e),r=0;r<12;r++)n[r]=M(n[r]),s[r]=M(s[r]);for(r=0;r<24;r++)i[r]=M(i[r]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function Ae(e){return he(e)?366:365}s("Y",0,0,function(){var e=this.year();
vendor: 36,992 bytes, line 10149
10149return e<=9999?r(e,4):"+"+e}),s(0,["YY",2],0,function(){return this.year()%100}),s(0,["YYYY",4],0,"year"),s(0,["YYYYY",5],0,"year"),s(0,["YYYYYY",6,!0],0,"year"),t("year","y"),n("year",1),v("Y",De),v("YY",p,w),v("YYYY",ke,_e),v("YYYYY",ve,ye),v("YYYYYY",ve,ye),D(["YYYYY","YYYYYY"],Y),D("YYYY",function(e,t){t[Y]=2===e.length?f.parseTwoDigitYear(e):g(e)}),D("YY",function(e,t){t[Y]=f.parseTwoDigitYear(e)}),D("Y",function(e,t){t[Y]=parseInt(e,10)}),f.parseTwoDigitYear=function(e){return g(e)+(68<g(e)?1900:2e3)};var Ie=de("FullYear",!0);function je(e,t,n,s,i,r,a){var o;return e<100&&0<=e?(o=new Date(e+400,t,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,r,a),o}function Ze(e){var t;return e<100&&0<=e?((t=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,t)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function ze(e,t,n){n=7+t-n;return n-(7+Ze(e,0,n).getUTCDay()-t)%7-1}function $e(e,t,n,s,i){var r,t=1+7*(t-1)+(7+n-s)%7+ze(e,s,i),n=t<=0?Ae(r=e-1)+t:t>Ae(e)?(r=e+1,t-Ae(e)):(r=e,t);return{year:r,dayOfYear:n}}function qe(e,t,n){var s,i,r=ze(e.year(),t,n),r=Math.floor((e.dayOfYear()-r-1)/7)+1;return r<1?s=r+P(i=e.year()-1,t,n):r>P(e.year(),t,n)?(s=r-P(e.year(),t,n),i=e.year()+1):(i=e.year(),s=r),{week:s,year:i}}function P(e,t,n){var s=ze(e,t,n),t=ze(e+1,t,n);return(Ae(e)-s+t)/7}s("w",["ww",2],"wo","week"),s("W",["WW",2],"Wo","isoWeek"),t("week","w"),t("isoWeek","W"),n("week",5),n("isoWeek",5),v("w",p),v("ww",p,w),v("W",p),v("WW",p,w),Te(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=g(e)});function Be(e,t){return e.slice(t,7).concat(e.slice(0,t))}s("d",0,"do","day"),s("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),s("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),s("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),s("e",0,0,"weekday"),s("E",0,0,"isoWeekday"),t("day","d"),t("weekday","e"),t("isoWeekday","E"),n("day",11),n("weekday",11),n("isoWeekday",11),v("d",p),v("e",p),v("E",p),v("dd",function(e,t){return t.weekdaysMinRegex(e)}),v("ddd",function(e,t){return t.weekdaysShortRegex(e)}),v("dddd",function(e,t){return t.weekdaysRegex(e)}),Te(["dd","ddd","dddd"],function(e,t,n,s){s=n._locale.weekdaysParse(e,s,n._strict);null!=s?t.d=s:m(n).invalidWeekday=e}),Te(["d","e","E"],function(e,t,n,s){t[s]=g(e)});var Je="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Qe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Xe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ke=k,et=k,tt=k;function nt(){function e(e,t){return t.length-e.length}for(var t,n,s,i=[],r=[],a=[],o=[],u=0;u<7;u++)s=l([2e3,1]).day(u),t=M(this.weekdaysMin(s,"")),n=M(this.weekdaysShort(s,"")),s=M(this.weekdays(s,"")),i.push(t),r.push(n),a.push(s),o.push(t),o.push(n),o.push(s);i.sort(e),r.sort(e),a.sort(e),o.sort(e),this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function st(){return this.hours()%12||12}function it(e,t){s(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function rt(e,t){return t._meridiemParse}s("H",["HH",2],0,"hour"),s("h",["hh",2],0,st),s("k",["kk",2],0,function(){return this.hours()||24}),s("hmm",0,0,function(){return""+st.apply(this)+r(this.minutes(),2)}),s("hmmss",0,0,function(){return""+st.apply(this)+r(this.minutes(),2)+r(this.seconds(),2)}),s("Hmm",0,0,function(){return""+this.hours()+r(this.minutes(),2)}),s("Hmmss",0,0,function(){return""+this.hours()+r(this.minutes(),2)+r(this.seconds(),2)}),it("a",!0),it("A",!1),t("hour","h"),n("hour",13),v("a",rt),v("A",rt),v("H",p),v("h",p),v("k",p),v("HH",p,w),v("hh",p,w),v("kk",p,w),v("hmm",ge),v("hmmss",we),v("Hmm",ge),v("Hmmss",we),D(["H","HH"],x),D(["k","kk"],function(e,t,n){e=g(e);t[x]=24===e?0:e}),D(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),D(["h","hh"],function(e,t,n){t[x]=g(e),m(n).bigHour=!0}),D("hmm",function(e,t,n){var s=e.length-2;t[x]=g(e.substr(0,s)),t[T]=g(e.substr(s)),m(n).bigHour=!0}),D("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[x]=g(e.substr(0,s)),t[T]=g(e.substr(s,2)),t[N]=g(e.substr(i)),m(n).bigHour=!0}),D("Hmm",function(e,t,n){var s=e.length-2;t[x]=g(e.substr(0,s)),t[T]=g(e.substr(s))}),D("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[x]=g(e.substr(0,s)),t[T]=g(e.substr(s,2)),t[N]=g(e.substr(i))});k=de("Hours",!0);var at,ot={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,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",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ce,monthsShort:Ue,week:{dow:0,doy:6},weekdays:Je,weekdaysMin:Xe,weekdaysShort:Qe,meridiemParse:/[ap]\.?m?\.?/i},R={},ut={};function lt(e){return e&&e.toLowerCase().replace("_","-")}function ht(e){for(var t,n,s,i,r=0;r<e.length;){for(t=(i=lt(e[r]).split("-")).length,n=(n=lt(e[r+1]))?n.split("-"):null;0<t;){if(s=dt(i.slice(0,t).join("-")))return s;if(n&&n.length>=t&&function(e,t){for(var n=Math.min(e.length,t.length),s=0;s<n;s+=1)if(e[s]!==t[s])return s;return n}(i,n)>=t-1)break;t--}r++}return at}function dt(t){var e;if(void 0===R[t]&&"undefined"!=typeof module&&module&&module.exports&&null!=t.match("^[^/\\\\]*$"))try{e=at._abbr,require("./locale/"+t),ct(e)}catch(e){R[t]=null}return R[t]}function ct(e,t){return e&&((t=o(t)?mt(e):ft(e,t))?at=t:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),at._abbr}function ft(e,t){if(null===t)return delete R[e],null;var n,s=ot;if(t.abbr=e,null!=R[e])Q("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=R[e]._config;else if(null!=t.parentLocale)if(null!=R[t.parentLocale])s=R[t.parentLocale]._config;else{if(null==(n=dt(t.parentLocale)))return ut[t.parentLocale]||(ut[t.parentLocale]=[]),ut[t.parentLocale].push({name:e,config:t}),null;s=n._config}return R[e]=new K(X(s,t)),ut[e]&&ut[e].forEach(function(e){ft(e.name,e.config)}),ct(e),R[e]}function mt(e){var t;if(!(e=e&&e._locale&&e._locale._abbr?e._locale._abbr:e))return at;if(!a(e)){if(t=dt(e))return t;e=[e]}return ht(e)}function _t(e){var t=e._a;return t&&-2===m(e).overflow&&(t=t[O]<0||11<t[O]?O:t[b]<1||t[b]>We(t[Y],t[O])?b:t[x]<0||24<t[x]||24===t[x]&&(0!==t[T]||0!==t[N]||0!==t[Ne])?x:t[T]<0||59<t[T]?T:t[N]<0||59<t[N]?N:t[Ne]<0||999<t[Ne]?Ne:-1,m(e)._overflowDayOfYear&&(t<Y||b<t)&&(t=b),m(e)._overflowWeeks&&-1===t&&(t=Pe),m(e)._overflowWeekday&&-1===t&&(t=Re),m(e).overflow=t),e}var yt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wt=/Z|[+-]\d\d(?::?\d\d)?/,pt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],kt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],vt=/^\/?Date\((-?\d+)/i,Mt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Dt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function St(e){var t,n,s,i,r,a,o=e._i,u=yt.exec(o)||gt.exec(o),o=pt.length,l=kt.length;if(u){for(m(e).iso=!0,t=0,n=o;t<n;t++)if(pt[t][1].exec(u[1])){i=pt[t][0],s=!1!==pt[t][2];break}if(null==i)e._isValid=!1;else{if(u[3]){for(t=0,n=l;t<n;t++)if(kt[t][1].exec(u[3])){r=(u[2]||" ")+kt[t][0];break}if(null==r)return void(e._isValid=!1)}if(s||null==r){if(u[4]){if(!wt.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=i+(r||"")+(a||""),Tt(e)}else e._isValid=!1}}else e._isValid=!1}function Yt(e,t,n,s,i,r){e=[function(e){e=parseInt(e,10);{if(e<=49)return 2e3+e;if(e<=999)return 1900+e}return e}(e),Ue.indexOf(t),parseInt(n,10),parseInt(s,10),parseInt(i,10)];return r&&e.push(parseInt(r,10)),e}function Ot(e){var t,n,s,i,r=Mt.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));r?(t=Yt(r[4],r[3],r[2],r[5],r[6],r[7]),n=r[1],s=t,i=e,n&&Qe.indexOf(n)!==new Date(s[0],s[1],s[2]).getDay()?(m(i).weekdayMismatch=!0,i._isValid=!1):(e._a=t,e._tzm=(n=r[8],s=r[9],i=r[10],n?Dt[n]:s?0:60*(((n=parseInt(i,10))-(s=n%100))/100)+s),e._d=Ze.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),m(e).rfc2822=!0)):e._isValid=!1}function bt(e,t,n){return null!=e?e:null!=t?t:n}function xt(e){var t,n,s,i,r,a,o,u,l,h,d,c=[];if(!e._d){for(s=e,i=new Date(f.now()),n=s._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()],e._w&&null==e._a[b]&&null==e._a[O]&&(null!=(i=(s=e)._w).GG||null!=i.W||null!=i.E?(u=1,l=4,r=bt(i.GG,s._a[Y],qe(W(),1,4).year),a=bt(i.W,1),((o=bt(i.E,1))<1||7<o)&&(h=!0)):(u=s._locale._week.dow,l=s._locale._week.doy,d=qe(W(),u,l),r=bt(i.gg,s._a[Y],d.year),a=bt(i.w,d.week),null!=i.d?((o=i.d)<0||6<o)&&(h=!0):null!=i.e?(o=i.e+u,(i.e<0||6<i.e)&&(h=!0)):o=u),a<1||a>P(r,u,l)?m(s)._overflowWeeks=!0:null!=h?m(s)._overflowWeekday=!0:(d=$e(r,a,o,u,l),s._a[Y]=d.year,s._dayOfYear=d.dayOfYear)),null!=e._dayOfYear&&(i=bt(e._a[Y],n[Y]),(e._dayOfYear>Ae(i)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),h=Ze(i,0,e._dayOfYear),e._a[O]=h.getUTCMonth(),e._a[b]=h.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=c[t]=n[t];for(;t<7;t++)e._a[t]=c[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[x]&&0===e._a[T]&&0===e._a[N]&&0===e._a[Ne]&&(e._nextDay=!0,e._a[x]=0),e._d=(e._useUTC?Ze:je).apply(null,c),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[x]=24),e._w&&void 0!==e._w.d&&e._w.d!==r&&(m(e).weekdayMismatch=!0)}}function Tt(e){if(e._f===f.ISO_8601)St(e);else if(e._f===f.RFC_2822)Ot(e);else{e._a=[],m(e).empty=!0;for(var t,n,s,i,r,a=""+e._i,o=a.length,u=0,l=ae(e._f,e._locale).match(te)||[],h=l.length,d=0;d<h;d++)n=l[d],(t=(a.match(Oe(n,e))||[])[0])&&(0<(s=a.substr(0,a.indexOf(t))).length&&m(e).unusedInput.push(s),a=a.slice(a.indexOf(t)+t.length),u+=t.length),ie[n]?(t?m(e).empty=!1:m(e).unusedTokens.push(n),s=n,r=e,null!=(i=t)&&c(xe,s)&&xe[s](i,r._a,r,s)):e._strict&&!t&&m(e).unusedTokens.push(n);m(e).charsLeftOver=o-u,0<a.length&&m(e).unusedInput.push(a),e._a[x]<=12&&!0===m(e).bigHour&&0<e._a[x]&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[x]=function(e,t,n){if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((e=e.isPM(n))&&t<12&&(t+=12),t=e||12!==t?t:0):t}(e._locale,e._a[x],e._meridiem),null!==(o=m(e).era)&&(e._a[Y]=e._locale.erasConvertYear(o,e._a[Y])),xt(e),_t(e)}}function Nt(e){var t,n,s,i=e._i,r=e._f;if(e._locale=e._locale||mt(e._l),null===i||void 0===r&&""===i)return I({nullInput:!0});if("string"==typeof i&&(e._i=i=e._locale.preparse(i)),h(i))return new q(_t(i));if(V(i))e._d=i;else if(a(r))!function(e){var t,n,s,i,r,a,o=!1,u=e._f.length;if(0===u)return m(e).invalidFormat=!0,e._d=new Date(NaN);for(i=0;i<u;i++)r=0,a=!1,t=$({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],Tt(t),A(t)&&(a=!0),r=(r+=m(t).charsLeftOver)+10*m(t).unusedTokens.length,m(t).score=r,o?r<s&&(s=r,n=t):(null==s||r<s||a)&&(s=r,n=t,a&&(o=!0));E(e,n||t)}(e);else if(r)Tt(e);else if(o(r=(i=e)._i))i._d=new Date(f.now());else V(r)?i._d=new Date(r.valueOf()):"string"==typeof r?(n=i,null!==(t=vt.exec(n._i))?n._d=new Date(+t[1]):(St(n),!1===n._isValid&&(delete n._isValid,Ot(n),!1===n._isValid&&(delete n._isValid,n._strict?n._isValid=!1:f.createFromInputFallback(n))))):a(r)?(i._a=G(r.slice(0),function(e){return parseInt(e,10)}),xt(i)):F(r)?(t=i)._d||(s=void 0===(n=ue(t._i)).day?n.date:n.day,t._a=G([n.year,n.month,s,n.hour,n.minute,n.second,n.millisecond],function(e){return e&&parseInt(e,10)}),xt(t)):u(r)?i._d=new Date(r):f.createFromInputFallback(i);return A(e)||(e._d=null),e}function Pt(e,t,n,s,i){var r={};return!0!==t&&!1!==t||(s=t,t=void 0),!0!==n&&!1!==n||(s=n,n=void 0),(F(e)&&L(e)||a(e)&&0===e.length)&&(e=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=i,r._l=n,r._i=e,r._f=t,r._strict=s,(i=new q(_t(Nt(i=r))))._nextDay&&(i.add(1,"d"),i._nextDay=void 0),i}function W(e,t,n,s){return Pt(e,t,n,s,!1)}f.createFromInputFallback=e("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),f.ISO_8601=function(){},f.RFC_2822=function(){};ge=e("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=W.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:I()}),we=e("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=W.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:I()});function Rt(e,t){var n,s;if(!(t=1===t.length&&a(t[0])?t[0]:t).length)return W();for(n=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](n)||(n=t[s]);return n}var Wt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ct(e){var e=ue(e),t=e.year||0,n=e.quarter||0,s=e.month||0,i=e.week||e.isoWeek||0,r=e.day||0,a=e.hour||0,o=e.minute||0,u=e.second||0,l=e.millisecond||0;this._isValid=function(e){var t,n,s=!1,i=Wt.length;for(t in e)if(c(e,t)&&(-1===S.call(Wt,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<i;++n)if(e[Wt[n]]){if(s)return!1;parseFloat(e[Wt[n]])!==g(e[Wt[n]])&&(s=!0)}return!0}(e),this._milliseconds=+l+1e3*u+6e4*o+1e3*a*60*60,this._days=+r+7*i,this._months=+s+3*n+12*t,this._data={},this._locale=mt(),this._bubble()}function Ut(e){return e instanceof Ct}function Ht(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ft(e,n){s(e,0,0,function(){var e=this.utcOffset(),t="+";return e<0&&(e=-e,t="-"),t+r(~~(e/60),2)+n+r(~~e%60,2)})}Ft("Z",":"),Ft("ZZ",""),v("Z",Ye),v("ZZ",Ye),D(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Vt(Ye,e)});var Lt=/([\+\-]|\d\d)/gi;function Vt(e,t){var t=(t||"").match(e);return null===t?null:0===(t=60*(e=((t[t.length-1]||[])+"").match(Lt)||["-",0,0])[1]+g(e[2]))?0:"+"===e[0]?t:-t}function Gt(e,t){var n;return t._isUTC?(t=t.clone(),n=(h(e)||V(e)?e:W(e)).valueOf()-t.valueOf(),t._d.setTime(t._d.valueOf()+n),f.updateOffset(t,!1),t):W(e).local()}function Et(e){return-Math.round(e._d.getTimezoneOffset())}function At(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}f.updateOffset=function(){};var It=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,jt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function C(e,t){var n,s=e,i=null;return Ut(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(s={},t?s[t]=+e:s.milliseconds=+e):(i=It.exec(e))?(n="-"===i[1]?-1:1,s={y:0,d:g(i[b])*n,h:g(i[x])*n,m:g(i[T])*n,s:g(i[N])*n,ms:g(Ht(1e3*i[Ne]))*n}):(i=jt.exec(e))?(n="-"===i[1]?-1:1,s={y:Zt(i[2],n),M:Zt(i[3],n),w:Zt(i[4],n),d:Zt(i[5],n),h:Zt(i[6],n),m:Zt(i[7],n),s:Zt(i[8],n)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(t=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Gt(t,e),e.isBefore(t)?n=zt(e,t):((n=zt(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(W(s.from),W(s.to)),(s={}).ms=t.milliseconds,s.M=t.months),i=new Ct(s),Ut(e)&&c(e,"_locale")&&(i._locale=e._locale),Ut(e)&&c(e,"_isValid")&&(i._isValid=e._isValid),i}function Zt(e,t){e=e&&parseFloat(e.replace(",","."));return(isNaN(e)?0:e)*t}function zt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function $t(s,i){return function(e,t){var n;return null===t||isNaN(+t)||(Q(i,"moment()."+i+"(period, number) is deprecated. Please use moment()."+i+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=e,e=t,t=n),qt(this,C(e,t),s),this}}function qt(e,t,n,s){var i=t._milliseconds,r=Ht(t._days),t=Ht(t._months);e.isValid()&&(s=null==s||s,t&&Ve(e,ce(e,"Month")+t*n),r&&fe(e,"Date",ce(e,"Date")+r*n),i&&e._d.setTime(e._d.valueOf()+i*n),s&&f.updateOffset(e,r||t))}C.fn=Ct.prototype,C.invalid=function(){return C(NaN)};Ce=$t(1,"add"),Je=$t(-1,"subtract");function Bt(e){return"string"==typeof e||e instanceof String}function Jt(e){return h(e)||V(e)||Bt(e)||u(e)||function(t){var e=a(t),n=!1;e&&(n=0===t.filter(function(e){return!u(e)&&Bt(t)}).length);return e&&n}(e)||function(e){var t,n,s=F(e)&&!L(e),i=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],a=r.length;for(t=0;t<a;t+=1)n=r[t],i=i||c(e,n);return s&&i}(e)||null==e}function Qt(e,t){if(e.date()<t.date())return-Qt(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),s=e.clone().add(n,"months"),t=t-s<0?(t-s)/(s-e.clone().add(n-1,"months")):(t-s)/(e.clone().add(1+n,"months")-s);return-(n+t)||0}function Xt(e){return void 0===e?this._locale._abbr:(null!=(e=mt(e))&&(this._locale=e),this)}f.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",f.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";Xe=e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function Kt(){return this._locale}var en=126227808e5;function tn(e,t){return(e%t+t)%t}function nn(e,t,n){return e<100&&0<=e?new Date(e+400,t,n)-en:new Date(e,t,n).valueOf()}function sn(e,t,n){return e<100&&0<=e?Date.UTC(e+400,t,n)-en:Date.UTC(e,t,n)}function rn(e,t){return t.erasAbbrRegex(e)}function an(){for(var e=[],t=[],n=[],s=[],i=this.eras(),r=0,a=i.length;r<a;++r)t.push(M(i[r].name)),e.push(M(i[r].abbr)),n.push(M(i[r].narrow)),s.push(M(i[r].name)),s.push(M(i[r].abbr)),s.push(M(i[r].narrow));this._erasRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}function on(e,t){s(0,[e,e.length],0,t)}function un(e,t,n,s,i){var r;return null==e?qe(this,s,i).year:(r=P(e,s,i),function(e,t,n,s,i){e=$e(e,t,n,s,i),t=Ze(e.year,0,e.dayOfYear);return this.year(t.getUTCFullYear()),this.month(t.getUTCMonth()),this.date(t.getUTCDate()),this}.call(this,e,t=r<t?r:t,n,s,i))}s("N",0,0,"eraAbbr"),s("NN",0,0,"eraAbbr"),s("NNN",0,0,"eraAbbr"),s("NNNN",0,0,"eraName"),s("NNNNN",0,0,"eraNarrow"),s("y",["y",1],"yo","eraYear"),s("y",["yy",2],0,"eraYear"),s("y",["yyy",3],0,"eraYear"),s("y",["yyyy",4],0,"eraYear"),v("N",rn),v("NN",rn),v("NNN",rn),v("NNNN",function(e,t){return t.erasNameRegex(e)}),v("NNNNN",function(e,t){return t.erasNarrowRegex(e)}),D(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,s){s=n._locale.erasParse(e,s,n._strict);s?m(n).era=s:m(n).invalidEra=e}),v("y",Me),v("yy",Me),v("yyy",Me),v("yyyy",Me),v("yo",function(e,t){return t._eraYearOrdinalRegex||Me}),D(["y","yy","yyy","yyyy"],Y),D(["yo"],function(e,t,n,s){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Y]=n._locale.eraYearOrdinalParse(e,i):t[Y]=parseInt(e,10)}),s(0,["gg",2],0,function(){return this.weekYear()%100}),s(0,["GG",2],0,function(){return this.isoWeekYear()%100}),on("gggg","weekYear"),on("ggggg","weekYear"),on("GGGG","isoWeekYear"),on("GGGGG","isoWeekYear"),t("weekYear","gg"),t("isoWeekYear","GG"),n("weekYear",1),n("isoWeekYear",1),v("G",De),v("g",De),v("GG",p,w),v("gg",p,w),v("GGGG",ke,_e),v("gggg",ke,_e),v("GGGGG",ve,ye),v("ggggg",ve,ye),Te(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=g(e)}),Te(["gg","GG"],function(e,t,n,s){t[s]=f.parseTwoDigitYear(e)}),s("Q",0,"Qo","quarter"),t("quarter","Q"),n("quarter",7),v("Q",i),D("Q",function(e,t){t[O]=3*(g(e)-1)}),s("D",["DD",2],"Do","date"),t("date","D"),n("date",9),v("D",p),v("DD",p,w),v("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),D(["D","DD"],b),D("Do",function(e,t){t[b]=g(e.match(p)[0])});ke=de("Date",!0);s("DDD",["DDDD",3],"DDDo","dayOfYear"),t("dayOfYear","DDD"),n("dayOfYear",4),v("DDD",pe),v("DDDD",me),D(["DDD","DDDD"],function(e,t,n){n._dayOfYear=g(e)}),s("m",["mm",2],0,"minute"),t("minute","m"),n("minute",14),v("m",p),v("mm",p,w),D(["m","mm"],T);var ln,_e=de("Minutes",!1),ve=(s("s",["ss",2],0,"second"),t("second","s"),n("second",15),v("s",p),v("ss",p,w),D(["s","ss"],N),de("Seconds",!1));for(s("S",0,0,function(){return~~(this.millisecond()/100)}),s(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),s(0,["SSS",3],0,"millisecond"),s(0,["SSSS",4],0,function(){return 10*this.millisecond()}),s(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),s(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),s(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),s(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),s(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),t("millisecond","ms"),n("millisecond",16),v("S",pe,i),v("SS",pe,w),v("SSS",pe,me),ln="SSSS";ln.length<=9;ln+="S")v(ln,Me);function hn(e,t){t[Ne]=g(1e3*("0."+e))}for(ln="S";ln.length<=9;ln+="S")D(ln,hn);ye=de("Milliseconds",!1),s("z",0,0,"zoneAbbr"),s("zz",0,0,"zoneName");i=q.prototype;function dn(e){return e}i.add=Ce,i.calendar=function(e,t){1===arguments.length&&(arguments[0]?Jt(arguments[0])?(e=arguments[0],t=void 0):function(e){for(var t=F(e)&&!L(e),n=!1,s=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i=0;i<s.length;i+=1)n=n||c(e,s[i]);return t&&n}(arguments[0])&&(t=arguments[0],e=void 0):t=e=void 0);var e=e||W(),n=Gt(e,this).startOf("day"),n=f.calendarFormat(this,n)||"sameElse",t=t&&(d(t[n])?t[n].call(this,e):t[n]);return this.format(t||this.localeData().calendar(n,this,W(e)))},i.clone=function(){return new q(this)},i.diff=function(e,t,n){var s,i,r;if(!this.isValid())return NaN;if(!(s=Gt(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=_(t)){case"year":r=Qt(this,s)/12;break;case"month":r=Qt(this,s);break;case"quarter":r=Qt(this,s)/3;break;case"second":r=(this-s)/1e3;break;case"minute":r=(this-s)/6e4;break;case"hour":r=(this-s)/36e5;break;case"day":r=(this-s-i)/864e5;break;case"week":r=(this-s-i)/6048e5;break;default:r=this-s}return n?r:y(r)},i.endOf=function(e){var t,n;if(void 0===(e=_(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?sn:nn,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-tn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-tn(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-tn(t,1e3)-1;break}return this._d.setTime(t),f.updateOffset(this,!0),this},i.format=function(e){return e=e||(this.isUtc()?f.defaultFormatUtc:f.defaultFormat),e=re(this,e),this.localeData().postformat(e)},i.from=function(e,t){return this.isValid()&&(h(e)&&e.isValid()||W(e).isValid())?C({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},i.fromNow=function(e){return this.from(W(),e)},i.to=function(e,t){return this.isValid()&&(h(e)&&e.isValid()||W(e).isValid())?C({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},i.toNow=function(e){return this.to(W(),e)},i.get=function(e){return d(this[e=_(e)])?this[e]():this},i.invalidAt=function(){return m(this).overflow},i.isAfter=function(e,t){return e=h(e)?e:W(e),!(!this.isValid()||!e.isValid())&&("millisecond"===(t=_(t)||"millisecond")?this.valueOf()>e.valueOf():e.valueOf()<this.clone().startOf(t).valueOf())},i.isBefore=function(e,t){return e=h(e)?e:W(e),!(!this.isValid()||!e.isValid())&&("millisecond"===(t=_(t)||"millisecond")?this.valueOf()<e.valueOf():this.clone().endOf(t).valueOf()<e.valueOf())},i.isBetween=function(e,t,n,s){return e=h(e)?e:W(e),t=h(t)?t:W(t),!!(this.isValid()&&e.isValid()&&t.isValid())&&(("("===(s=s||"()")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===s[1]?this.isBefore(t,n):!this.isAfter(t,n)))},i.isSame=function(e,t){var e=h(e)?e:W(e);return!(!this.isValid()||!e.isValid())&&("millisecond"===(t=_(t)||"millisecond")?this.valueOf()===e.valueOf():(e=e.valueOf(),this.clone().startOf(t).valueOf()<=e&&e<=this.clone().endOf(t).valueOf()))},i.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},i.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},i.isValid=function(){return A(this)},i.lang=Xe,i.locale=Xt,i.localeData=Kt,i.max=we,i.min=ge,i.parsingFlags=function(){return E({},m(this))},i.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t,n=[];for(t in e)c(e,t)&&n.push({unit:t,priority:le[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}(e=ue(e)),s=n.length,i=0;i<s;i++)this[n[i].unit](e[n[i].unit]);else if(d(this[e=_(e)]))return this[e](t);return this},i.startOf=function(e){var t,n;if(void 0===(e=_(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?sn:nn,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=tn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=tn(t,6e4);break;case"second":t=this._d.valueOf(),t-=tn(t,1e3);break}return this._d.setTime(t),f.updateOffset(this,!0),this},i.subtract=Je,i.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},i.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},i.toDate=function(){return new Date(this.valueOf())},i.toISOString=function(e){if(!this.isValid())return null;var t=(e=!0!==e)?this.clone().utc():this;return t.year()<0||9999<t.year()?re(t,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):d(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",re(t,"Z")):re(t,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},i.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t="moment",n="";return this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",n="Z"),t="["+t+'("]',e=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",this.format(t+e+"-MM-DD[T]HH:mm:ss.SSS"+(n+'[")]'))},"undefined"!=typeof Symbol&&null!=Symbol.for&&(i[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),i.toJSON=function(){return this.isValid()?this.toISOString():null},i.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},i.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},i.eraName=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].name;if(t[n].until<=e&&e<=t[n].since)return t[n].name}return""},i.eraNarrow=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].narrow;if(t[n].until<=e&&e<=t[n].since)return t[n].narrow}return""},i.eraAbbr=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].abbr;if(t[n].until<=e&&e<=t[n].since)return t[n].abbr}return""},i.eraYear=function(){for(var e,t,n=this.localeData().eras(),s=0,i=n.length;s<i;++s)if(e=n[s].since<=n[s].until?1:-1,t=this.clone().startOf("day").valueOf(),n[s].since<=t&&t<=n[s].until||n[s].until<=t&&t<=n[s].since)return(this.year()-f(n[s].since).year())*e+n[s].offset;return this.year()},i.year=Ie,i.isLeapYear=function(){return he(this.year())},i.weekYear=function(e){return un.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},i.isoWeekYear=function(e){return un.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},i.quarter=i.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},i.month=Ge,i.daysInMonth=function(){return We(this.year(),this.month())},i.week=i.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},i.isoWeek=i.isoWeeks=function(e){var t=qe(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},i.weeksInYear=function(){var e=this.localeData()._week;return P(this.year(),e.dow,e.doy)},i.weeksInWeekYear=function(){var e=this.localeData()._week;return P(this.weekYear(),e.dow,e.doy)},i.isoWeeksInYear=function(){return P(this.year(),1,4)},i.isoWeeksInISOWeekYear=function(){return P(this.isoWeekYear(),1,4)},i.date=ke,i.day=i.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t,n,s=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(t=e,n=this.localeData(),e="string"!=typeof t?t:isNaN(t)?"number"==typeof(t=n.weekdaysParse(t))?t:null:parseInt(t,10),this.add(e-s,"d")):s},i.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},i.isoWeekday=function(e){return this.isValid()?null!=e?(t=e,n=this.localeData(),n="string"==typeof t?n.weekdaysParse(t)%7||7:isNaN(t)?null:t,this.day(this.day()%7?n:n-7)):this.day()||7:null!=e?this:NaN;var t,n},i.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},i.hour=i.hours=k,i.minute=i.minutes=_e,i.second=i.seconds=ve,i.millisecond=i.milliseconds=ye,i.utcOffset=function(e,t,n){var s,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null==e)return this._isUTC?i:Et(this);if("string"==typeof e){if(null===(e=Vt(Ye,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(s=Et(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,"m"),i!==e&&(!t||this._changeInProgress?qt(this,C(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,f.updateOffset(this,!0),this._changeInProgress=null)),this},i.utc=function(e){return this.utcOffset(0,e)},i.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Et(this),"m")),this},i.parseZone=function(){var e;return null!=this._tzm?this.utcOffset(this._tzm,!1,!0):"string"==typeof this._i&&(null!=(e=Vt(Se,this._i))?this.utcOffset(e):this.utcOffset(0,!0)),this},i.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?W(e).utcOffset():0,(this.utcOffset()-e)%60==0)},i.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},i.isLocal=function(){return!!this.isValid()&&!this._isUTC},i.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},i.isUtc=At,i.isUTC=At,i.zoneAbbr=function(){return this._isUTC?"UTC":""},i.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},i.dates=e("dates accessor is deprecated. Use date instead.",ke),i.months=e("months accessor is deprecated. Use month instead",Ge),i.years=e("years accessor is deprecated. Use year instead",Ie),i.zone=e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?(this.utcOffset(e="string"!=typeof e?-e:e,t),this):-this.utcOffset()}),i.isDSTShifted=e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!o(this._isDSTShifted))return this._isDSTShifted;var e,t={};return $(t,this),(t=Nt(t))._a?(e=(t._isUTC?l:W)(t._a),this._isDSTShifted=this.isValid()&&0<function(e,t,n){for(var s=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),r=0,a=0;a<s;a++)(n&&e[a]!==t[a]||!n&&g(e[a])!==g(t[a]))&&r++;return r+i}(t._a,e.toArray())):this._isDSTShifted=!1,this._isDSTShifted});w=K.prototype;function cn(e,t,n,s){var i=mt(),s=l().set(s,t);return i[n](s,e)}function fn(e,t,n){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return cn(e,t,n,"month");for(var s=[],i=0;i<12;i++)s[i]=cn(e,i,n,"month");return s}function mn(e,t,n,s){t=("boolean"==typeof e?u(t)&&(n=t,t=void 0):(t=e,e=!1,u(n=t)&&(n=t,t=void 0)),t||"");var i,r=mt(),a=e?r._week.dow:0,o=[];if(null!=n)return cn(t,(n+a)%7,s,"day");for(i=0;i<7;i++)o[i]=cn(t,(i+a)%7,s,"day");return o}w.calendar=function(e,t,n){return d(e=this._calendar[e]||this._calendar.sameElse)?e.call(t,n):e},w.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(te).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])},w.invalidDate=function(){return this._invalidDate},w.ordinal=function(e){return this._ordinal.replace("%d",e)},w.preparse=dn,w.postformat=dn,w.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return d(i)?i(e,t,n,s):i.replace(/%d/i,e)},w.pastFuture=function(e,t){return d(e=this._relativeTime[0<e?"future":"past"])?e(t):e.replace(/%s/i,t)},w.set=function(e){var t,n;for(n in e)c(e,n)&&(d(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},w.eras=function(e,t){for(var n,s=this._eras||mt("en")._eras,i=0,r=s.length;i<r;++i){switch(typeof s[i].since){case"string":n=f(s[i].since).startOf("day"),s[i].since=n.valueOf();break}switch(typeof s[i].until){case"undefined":s[i].until=1/0;break;case"string":n=f(s[i].until).startOf("day").valueOf(),s[i].until=n.valueOf();break}}return s},w.erasParse=function(e,t,n){var s,i,r,a,o,u=this.eras();for(e=e.toUpperCase(),s=0,i=u.length;s<i;++s)if(r=u[s].name.toUpperCase(),a=u[s].abbr.toUpperCase(),o=u[s].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return u[s];break;case"NNNN":if(r===e)return u[s];break;case"NNNNN":if(o===e)return u[s];break}else if(0<=[r,a,o].indexOf(e))return u[s]},w.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?f(e.since).year():f(e.since).year()+(t-e.offset)*n},w.erasAbbrRegex=function(e){return c(this,"_erasAbbrRegex")||an.call(this),e?this._erasAbbrRegex:this._erasRegex},w.erasNameRegex=function(e){return c(this,"_erasNameRegex")||an.call(this),e?this._erasNameRegex:this._erasRegex},w.erasNarrowRegex=function(e){return c(this,"_erasNarrowRegex")||an.call(this),e?this._erasNarrowRegex:this._erasRegex}
vendor: 12,664 bytes, lines 10149-10156
10149,w.months=function(e,t){return e?(a(this._months)?this._months:this._months[(this._months.isFormat||He).test(t)?"format":"standalone"])[e.month()]:a(this._months)?this._months:this._months.standalone},w.monthsShort=function(e,t){return e?(a(this._monthsShort)?this._monthsShort:this._monthsShort[He.test(t)?"format":"standalone"])[e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},w.monthsParse=function(e,t,n){var s,i;if(this._monthsParseExact)return function(e,t,n){var s,i,r,e=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=l([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=S.call(this._shortMonthsParse,e))?i:null:-1!==(i=S.call(this._longMonthsParse,e))?i:null:"MMM"===t?-1!==(i=S.call(this._shortMonthsParse,e))||-1!==(i=S.call(this._longMonthsParse,e))?i:null:-1!==(i=S.call(this._longMonthsParse,e))||-1!==(i=S.call(this._shortMonthsParse,e))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=l([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(i="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(n&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},w.monthsRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||Ee.call(this),e?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=Le),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},w.monthsShortRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||Ee.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=Fe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},w.week=function(e){return qe(e,this._week.dow,this._week.doy).week},w.firstDayOfYear=function(){return this._week.doy},w.firstDayOfWeek=function(){return this._week.dow},w.weekdays=function(e,t){return t=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"],!0===e?Be(t,this._week.dow):e?t[e.day()]:t},w.weekdaysMin=function(e){return!0===e?Be(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},w.weekdaysShort=function(e){return!0===e?Be(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},w.weekdaysParse=function(e,t,n){var s,i;if(this._weekdaysParseExact)return function(e,t,n){var s,i,r,e=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=l([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=S.call(this._weekdaysParse,e))?i:null:"ddd"===t?-1!==(i=S.call(this._shortWeekdaysParse,e))?i:null:-1!==(i=S.call(this._minWeekdaysParse,e))?i:null:"dddd"===t?-1!==(i=S.call(this._weekdaysParse,e))||-1!==(i=S.call(this._shortWeekdaysParse,e))||-1!==(i=S.call(this._minWeekdaysParse,e))?i:null:"ddd"===t?-1!==(i=S.call(this._shortWeekdaysParse,e))||-1!==(i=S.call(this._weekdaysParse,e))||-1!==(i=S.call(this._minWeekdaysParse,e))?i:null:-1!==(i=S.call(this._minWeekdaysParse,e))||-1!==(i=S.call(this._weekdaysParse,e))||-1!==(i=S.call(this._shortWeekdaysParse,e))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=l([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(i="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},w.weekdaysRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=Ke),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},w.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=et),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},w.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=tt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},w.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},w.meridiem=function(e,t,n){return 11<e?n?"pm":"PM":n?"am":"AM"},ct("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===g(e%100/10)?"th":1==t?"st":2==t?"nd":3==t?"rd":"th")}}),f.lang=e("moment.lang is deprecated. Use moment.locale instead.",ct),f.langData=e("moment.langData is deprecated. Use moment.localeData instead.",mt);var _n=Math.abs;function yn(e,t,n,s){t=C(t,n);return e._milliseconds+=s*t._milliseconds,e._days+=s*t._days,e._months+=s*t._months,e._bubble()}function gn(e){return e<0?Math.floor(e):Math.ceil(e)}function wn(e){return 4800*e/146097}function pn(e){return 146097*e/4800}function kn(e){return function(){return this.as(e)}}pe=kn("ms"),me=kn("s"),Ce=kn("m"),we=kn("h"),ge=kn("d"),Je=kn("w"),k=kn("M"),_e=kn("Q"),ve=kn("y");function vn(e){return function(){return this.isValid()?this._data[e]:NaN}}var ye=vn("milliseconds"),ke=vn("seconds"),Ie=vn("minutes"),w=vn("hours"),Mn=vn("days"),Dn=vn("months"),Sn=vn("years");var Yn=Math.round,On={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function bn(e,t,n,s){var i=C(e).abs(),r=Yn(i.as("s")),a=Yn(i.as("m")),o=Yn(i.as("h")),u=Yn(i.as("d")),l=Yn(i.as("M")),h=Yn(i.as("w")),i=Yn(i.as("y")),r=(r<=n.ss?["s",r]:r<n.s&&["ss",r])||a<=1&&["m"]||a<n.m&&["mm",a]||o<=1&&["h"]||o<n.h&&["hh",o]||u<=1&&["d"]||u<n.d&&["dd",u];return(r=(r=null!=n.w?r||h<=1&&["w"]||h<n.w&&["ww",h]:r)||l<=1&&["M"]||l<n.M&&["MM",l]||i<=1&&["y"]||["yy",i])[2]=t,r[3]=0<+e,r[4]=s,function(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}.apply(null,r)}var xn=Math.abs;function Tn(e){return(0<e)-(e<0)||+e}function Nn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,s,i,r,a,o=xn(this._milliseconds)/1e3,u=xn(this._days),l=xn(this._months),h=this.asSeconds();return h?(e=y(o/60),t=y(e/60),o%=60,e%=60,n=y(l/12),l%=12,s=o?o.toFixed(3).replace(/\.?0+$/,""):"",i=Tn(this._months)!==Tn(h)?"-":"",r=Tn(this._days)!==Tn(h)?"-":"",a=Tn(this._milliseconds)!==Tn(h)?"-":"",(h<0?"-":"")+"P"+(n?i+n+"Y":"")+(l?i+l+"M":"")+(u?r+u+"D":"")+(t||e||o?"T":"")+(t?a+t+"H":"")+(e?a+e+"M":"")+(o?a+s+"S":"")):"P0D"}var U=Ct.prototype;return U.isValid=function(){return this._isValid},U.abs=function(){var e=this._data;return this._milliseconds=_n(this._milliseconds),this._days=_n(this._days),this._months=_n(this._months),e.milliseconds=_n(e.milliseconds),e.seconds=_n(e.seconds),e.minutes=_n(e.minutes),e.hours=_n(e.hours),e.months=_n(e.months),e.years=_n(e.years),this},U.add=function(e,t){return yn(this,e,t,1)},U.subtract=function(e,t){return yn(this,e,t,-1)},U.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if("month"===(e=_(e))||"quarter"===e||"year"===e)switch(t=this._days+s/864e5,n=this._months+wn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(pn(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}},U.asMilliseconds=pe,U.asSeconds=me,U.asMinutes=Ce,U.asHours=we,U.asDays=ge,U.asWeeks=Je,U.asMonths=k,U.asQuarters=_e,U.asYears=ve,U.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*g(this._months/12):NaN},U._bubble=function(){var e=this._milliseconds,t=this._days,n=this._months,s=this._data;return 0<=e&&0<=t&&0<=n||e<=0&&t<=0&&n<=0||(e+=864e5*gn(pn(n)+t),n=t=0),s.milliseconds=e%1e3,e=y(e/1e3),s.seconds=e%60,e=y(e/60),s.minutes=e%60,e=y(e/60),s.hours=e%24,t+=y(e/24),n+=e=y(wn(t)),t-=gn(pn(e)),e=y(n/12),n%=12,s.days=t,s.months=n,s.years=e,this},U.clone=function(){return C(this)},U.get=function(e){return e=_(e),this.isValid()?this[e+"s"]():NaN},U.milliseconds=ye,U.seconds=ke,U.minutes=Ie,U.hours=w,U.days=Mn,U.weeks=function(){return y(this.days()/7)},U.months=Dn,U.years=Sn,U.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,s=On;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(n=e),"object"==typeof t&&(s=Object.assign({},On,t),null!=t.s&&null==t.ss&&(s.ss=t.s-1)),e=this.localeData(),t=bn(this,!n,s,e),n&&(t=e.pastFuture(+this,t)),e.postformat(t)},U.toISOString=Nn,U.toString=Nn,U.toJSON=Nn,U.locale=Xt,U.localeData=Kt,U.toIsoString=e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Nn),U.lang=Xe,s("X",0,0,"unix"),s("x",0,0,"valueOf"),v("x",De),v("X",/[+-]?\d+(\.\d{1,3})?/),D("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),D("x",function(e,t,n){n._d=new Date(g(e))}),f.version="2.29.4",H=W,f.fn=i,f.min=function(){return Rt("isBefore",[].slice.call(arguments,0))},f.max=function(){return Rt("isAfter",[].slice.call(arguments,0))},f.now=function(){return Date.now?Date.now():+new Date},f.utc=l,f.unix=function(e){return W(1e3*e)},f.months=function(e,t){return fn(e,t,"months")},f.isDate=V,f.locale=ct,f.invalid=I,f.duration=C,f.isMoment=h,f.weekdays=function(e,t,n){return mn(e,t,n,"weekdays")},f.parseZone=function(){return W.apply(null,arguments).parseZone()},f.localeData=mt,f.isDuration=Ut,f.monthsShort=function(e,t){return fn(e,t,"monthsShort")},f.weekdaysMin=function(e,t,n){return mn(e,t,n,"weekdaysMin")},f.defineLocale=ft,f.updateLocale=function(e,t){var n,s;return null!=t?(s=ot,null!=R[e]&&null!=R[e].parentLocale?R[e].set(X(R[e]._config,t)):(t=X(s=null!=(n=dt(e))?n._config:s,t),null==n&&(t.abbr=e),(s=new K(t)).parentLocale=R[e],R[e]=s),ct(e)):null!=R[e]&&(null!=R[e].parentLocale?(R[e]=R[e].parentLocale,e===ct()&&ct(e)):null!=R[e]&&delete R[e]),R[e]},f.locales=function(){return ee(R)},f.weekdaysShort=function(e,t,n){return mn(e,t,n,"weekdaysShort")},f.normalizeUnits=_,f.relativeTimeRounding=function(e){return void 0===e?Yn:"function"==typeof e&&(Yn=e,!0)},f.relativeTimeThreshold=function(e,t){return void 0!==On[e]&&(void 0===t?On[e]:(On[e]=t,"s"===e&&(On.ss=t-1),!0))},f.calendarFormat=function(e,t){return(e=e.diff(t,"days",!0))<-6?"sameElse":e<-1?"lastWeek":e<0?"lastDay":e<1?"sameDay":e<2?"nextDay":e<7?"nextWeek":"sameElse"},f.prototype=i,f.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},f}); 10150//# sourceMappingURL=moment.min.js.map; 10151/* 10152 AngularJS v1.8.2 10153 (c) 2010-2020 Google LLC. http://angularjs.org 10154 License: MIT 10155*/ 10156(function(z){'use strict';function ve(a){if(D(a))w(a.objectMaxDepth)&&(Xb.objectMaxDepth=Yb(a.objectMaxDepth)?a.objectMaxDepth:NaN),w(a.urlErrorParam
10156sEnabled)&&Ga(a.urlErrorParamsEnabled)&&(Xb.urlErrorParamsEnabled=a.urlErrorParamsEnabled);else return Xb}function Yb(a){return X(a)&&0<a}function F(a,b){b=b||Error;return function(){var d=arguments[0],c;c="["+(a?a+":":"")+d+"] http://errors.angularjs.org/1.8.2
vendor: 13,480 bytes, lines 10156-10182
10156/"+(a?a+"/":"")+d;for(d=1;d<arguments.length;d++){c=c+(1==d?"?":"&")+"p"+(d-1)+"=";var e=encodeURIComponent, 10157f;f=arguments[d];f="function"==typeof f?f.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof f?"undefined":"string"!=typeof f?JSON.stringify(f):f;c+=e(f)}return new b(c)}}function za(a){if(null==a||$a(a))return!1;if(H(a)||C(a)||x&&a instanceof x)return!0;var b="length"in Object(a)&&a.length;return X(b)&&(0<=b&&b-1 in a||"function"===typeof a.item)}function r(a,b,d){var c,e;if(a)if(B(a))for(c in a)"prototype"!==c&&"length"!==c&&"name"!==c&&a.hasOwnProperty(c)&&b.call(d,a[c],c,a);else if(H(a)|| 10158za(a)){var f="object"!==typeof a;c=0;for(e=a.length;c<e;c++)(f||c in a)&&b.call(d,a[c],c,a)}else if(a.forEach&&a.forEach!==r)a.forEach(b,d,a);else if(Pc(a))for(c in a)b.call(d,a[c],c,a);else if("function"===typeof a.hasOwnProperty)for(c in a)a.hasOwnProperty(c)&&b.call(d,a[c],c,a);else for(c in a)ta.call(a,c)&&b.call(d,a[c],c,a);return a}function Qc(a,b,d){for(var c=Object.keys(a).sort(),e=0;e<c.length;e++)b.call(d,a[c[e]],c[e]);return c}function Zb(a){return function(b,d){a(d,b)}}function we(){return++qb} 10159function $b(a,b,d){for(var c=a.$$hashKey,e=0,f=b.length;e<f;++e){var g=b[e];if(D(g)||B(g))for(var k=Object.keys(g),h=0,l=k.length;h<l;h++){var m=k[h],p=g[m];d&&D(p)?ha(p)?a[m]=new Date(p.valueOf()):ab(p)?a[m]=new RegExp(p):p.nodeName?a[m]=p.cloneNode(!0):ac(p)?a[m]=p.clone():"__proto__"!==m&&(D(a[m])||(a[m]=H(p)?[]:{}),$b(a[m],[p],!0)):a[m]=p}}c?a.$$hashKey=c:delete a.$$hashKey;return a}function S(a){return $b(a,Ha.call(arguments,1),!1)}function xe(a){return $b(a,Ha.call(arguments,1),!0)}function fa(a){return parseInt(a, 1016010)}function bc(a,b){return S(Object.create(a),b)}function E(){}function Ta(a){return a}function ia(a){return function(){return a}}function cc(a){return B(a.toString)&&a.toString!==la}function A(a){return"undefined"===typeof a}function w(a){return"undefined"!==typeof a}function D(a){return null!==a&&"object"===typeof a}function Pc(a){return null!==a&&"object"===typeof a&&!Rc(a)}function C(a){return"string"===typeof a}function X(a){return"number"===typeof a}function ha(a){return"[object Date]"===la.call(a)} 10161function H(a){return Array.isArray(a)||a instanceof Array}function dc(a){switch(la.call(a)){case "[object Error]":return!0;case "[object Exception]":return!0;case "[object DOMException]":return!0;default:return a instanceof Error}}function B(a){return"function"===typeof a}function ab(a){return"[object RegExp]"===la.call(a)}function $a(a){return a&&a.window===a}function bb(a){return a&&a.$evalAsync&&a.$watch}function Ga(a){return"boolean"===typeof a}function ye(a){return a&&X(a.length)&&ze.test(la.call(a))} 10162function ac(a){return!(!a||!(a.nodeName||a.prop&&a.attr&&a.find))}function Ae(a){var b={};a=a.split(",");var d;for(d=0;d<a.length;d++)b[a[d]]=!0;return b}function ua(a){return K(a.nodeName||a[0]&&a[0].nodeName)}function cb(a,b){var d=a.indexOf(b);0<=d&&a.splice(d,1);return d}function Ia(a,b,d){function c(a,b,c){c--;if(0>c)return"...";var d=b.$$hashKey,f;if(H(a)){f=0;for(var g=a.length;f<g;f++)b.push(e(a[f],c))}else if(Pc(a))for(f in a)b[f]=e(a[f],c);else if(a&&"function"===typeof a.hasOwnProperty)for(f in a)a.hasOwnProperty(f)&& 10163(b[f]=e(a[f],c));else for(f in a)ta.call(a,f)&&(b[f]=e(a[f],c));d?b.$$hashKey=d:delete b.$$hashKey;return b}function e(a,b){if(!D(a))return a;var d=g.indexOf(a);if(-1!==d)return k[d];if($a(a)||bb(a))throw oa("cpws");var d=!1,e=f(a);void 0===e&&(e=H(a)?[]:Object.create(Rc(a)),d=!0);g.push(a);k.push(e);return d?c(a,e,b):e}function f(a){switch(la.call(a)){case "[object Int8Array]":case "[object Int16Array]":case "[object Int32Array]":case "[object Float32Array]":case "[object Float64Array]":case "[object Uint8Array]":case "[object Uint8ClampedArray]":case "[object Uint16Array]":case "[object Uint32Array]":return new a.constructor(e(a.buffer), 10164a.byteOffset,a.length);case "[object ArrayBuffer]":if(!a.slice){var b=new ArrayBuffer(a.byteLength);(new Uint8Array(b)).set(new Uint8Array(a));return b}return a.slice(0);case "[object Boolean]":case "[object Number]":case "[object String]":case "[object Date]":return new a.constructor(a.valueOf());case "[object RegExp]":return b=new RegExp(a.source,a.toString().match(/[^/]*$/)[0]),b.lastIndex=a.lastIndex,b;case "[object Blob]":return new a.constructor([a],{type:a.type})}if(B(a.cloneNode))return a.cloneNode(!0)} 10165var g=[],k=[];d=Yb(d)?d:NaN;if(b){if(ye(b)||"[object ArrayBuffer]"===la.call(b))throw oa("cpta");if(a===b)throw oa("cpi");H(b)?b.length=0:r(b,function(a,c){"$$hashKey"!==c&&delete b[c]});g.push(a);k.push(b);return c(a,b,d)}return e(a,d)}function ec(a,b){return a===b||a!==a&&b!==b}function va(a,b){if(a===b)return!0;if(null===a||null===b)return!1;if(a!==a&&b!==b)return!0;var d=typeof a,c;if(d===typeof b&&"object"===d)if(H(a)){if(!H(b))return!1;if((d=a.length)===b.length){for(c=0;c<d;c++)if(!va(a[c], 10166b[c]))return!1;return!0}}else{if(ha(a))return ha(b)?ec(a.getTime(),b.getTime()):!1;if(ab(a))return ab(b)?a.toString()===b.toString():!1;if(bb(a)||bb(b)||$a(a)||$a(b)||H(b)||ha(b)||ab(b))return!1;d=T();for(c in a)if("$"!==c.charAt(0)&&!B(a[c])){if(!va(a[c],b[c]))return!1;d[c]=!0}for(c in b)if(!(c in d)&&"$"!==c.charAt(0)&&w(b[c])&&!B(b[c]))return!1;return!0}return!1}function db(a,b,d){return a.concat(Ha.call(b,d))}function Va(a,b){var d=2<arguments.length?Ha.call(arguments,2):[];return!B(b)||b instanceof 10167RegExp?b:d.length?function(){return arguments.length?b.apply(a,db(d,arguments,0)):b.apply(a,d)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}}function Sc(a,b){var d=b;"string"===typeof a&&"$"===a.charAt(0)&&"$"===a.charAt(1)?d=void 0:$a(b)?d="$WINDOW":b&&z.document===b?d="$DOCUMENT":bb(b)&&(d="$SCOPE");return d}function eb(a,b){if(!A(a))return X(b)||(b=b?2:null),JSON.stringify(a,Sc,b)}function Tc(a){return C(a)?JSON.parse(a):a}function fc(a,b){a=a.replace(Be,"");var d=Date.parse("Jan 01, 1970 00:00:00 "+ 10168a)/6E4;return Y(d)?b:d}function Uc(a,b){a=new Date(a.getTime());a.setMinutes(a.getMinutes()+b);return a}function gc(a,b,d){d=d?-1:1;var c=a.getTimezoneOffset();b=fc(b,c);return Uc(a,d*(b-c))}function Aa(a){a=x(a).clone().empty();var b=x("<div></div>").append(a).html();try{return a[0].nodeType===Pa?K(b):b.match(/^(<[^>]+>)/)[1].replace(/^<([\w-]+)/,function(a,b){return"<"+K(b)})}catch(d){return K(b)}}function Vc(a){try{return decodeURIComponent(a)}catch(b){}}function hc(a){var b={};r((a||"").split("&"), 10169function(a){var c,e,f;a&&(e=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(e=a.substring(0,c),f=a.substring(c+1)),e=Vc(e),w(e)&&(f=w(f)?Vc(f):!0,ta.call(b,e)?H(b[e])?b[e].push(f):b[e]=[b[e],f]:b[e]=f))});return b}function Ce(a){var b=[];r(a,function(a,c){H(a)?r(a,function(a){b.push(ba(c,!0)+(!0===a?"":"="+ba(a,!0)))}):b.push(ba(c,!0)+(!0===a?"":"="+ba(a,!0)))});return b.length?b.join("&"):""}function ic(a){return ba(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ba(a, 10170b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function De(a,b){var d,c,e=Qa.length;for(c=0;c<e;++c)if(d=Qa[c]+b,C(d=a.getAttribute(d)))return d;return null}function Ee(a,b){var d,c,e={};r(Qa,function(b){b+="app";!d&&a.hasAttribute&&a.hasAttribute(b)&&(d=a,c=a.getAttribute(b))});r(Qa,function(b){b+="app";var e;!d&&(e=a.querySelector("["+b.replace(":","\\:")+"]"))&&(d=e,c=e.getAttribute(b))}); 10171d&&(Fe?(e.strictDi=null!==De(d,"strict-di"),b(d,c?[c]:[],e)):z.console.error("AngularJS: disabling automatic bootstrap. <script> protocol indicates an extension, document.location.href does not match."))}function Wc(a,b,d){D(d)||(d={});d=S({strictDi:!1},d);var c=function(){a=x(a);if(a.injector()){var c=a[0]===z.document?"document":Aa(a);throw oa("btstrpd",c.replace(/</,"<").replace(/>/,">"));}b=b||[];b.unshift(["$provide",function(b){b.value("$rootElement",a)}]);d.debugInfoEnabled&&b.push(["$compileProvider", 10172function(a){a.debugInfoEnabled(!0)}]);b.unshift("ng");c=fb(b,d.strictDi);c.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},e=/^NG_ENABLE_DEBUG_INFO!/,f=/^NG_DEFER_BOOTSTRAP!/;z&&e.test(z.name)&&(d.debugInfoEnabled=!0,z.name=z.name.replace(e,""));if(z&&!f.test(z.name))return c();z.name=z.name.replace(f,"");ca.resumeBootstrap=function(a){r(a,function(a){b.push(a)});return c()};B(ca.resumeDeferredBootstrap)&& 10173ca.resumeDeferredBootstrap()}function Ge(){z.name="NG_ENABLE_DEBUG_INFO!"+z.name;z.location.reload()}function He(a){a=ca.element(a).injector();if(!a)throw oa("test");return a.get("$$testability")}function Xc(a,b){b=b||"_";return a.replace(Ie,function(a,c){return(c?b:"")+a.toLowerCase()})}function Je(){var a;if(!Yc){var b=rb();(sb=A(b)?z.jQuery:b?z[b]:void 0)&&sb.fn.on?(x=sb,S(sb.fn,{scope:Wa.scope,isolateScope:Wa.isolateScope,controller:Wa.controller,injector:Wa.injector,inheritedData:Wa.inheritedData})): 10174x=U;a=x.cleanData;x.cleanData=function(b){for(var c,e=0,f;null!=(f=b[e]);e++)(c=(x._data(f)||{}).events)&&c.$destroy&&x(f).triggerHandler("$destroy");a(b)};ca.element=x;Yc=!0}}function Ke(){U.legacyXHTMLReplacement=!0}function gb(a,b,d){if(!a)throw oa("areq",b||"?",d||"required");return a}function tb(a,b,d){d&&H(a)&&(a=a[a.length-1]);gb(B(a),b,"not a function, got "+(a&&"object"===typeof a?a.constructor.name||"Object":typeof a));return a}function Ja(a,b){if("hasOwnProperty"===a)throw oa("badname", 10175b);}function Le(a,b,d){if(!b)return a;b=b.split(".");for(var c,e=a,f=b.length,g=0;g<f;g++)c=b[g],a&&(a=(e=a)[c]);return!d&&B(a)?Va(e,a):a}function ub(a){for(var b=a[0],d=a[a.length-1],c,e=1;b!==d&&(b=b.nextSibling);e++)if(c||a[e]!==b)c||(c=x(Ha.call(a,0,e))),c.push(b);return c||a}function T(){return Object.create(null)}function jc(a){if(null==a)return"";switch(typeof a){case "string":break;case "number":a=""+a;break;default:a=!cc(a)||H(a)||ha(a)?eb(a):a.toString()}return a}function Me(a){function b(a, 10176b,c){return a[b]||(a[b]=c())}var d=F("$injector"),c=F("ng");a=b(a,"angular",Object);a.$$minErr=a.$$minErr||F;return b(a,"module",function(){var a={};return function(f,g,k){var h={};if("hasOwnProperty"===f)throw c("badname","module");g&&a.hasOwnProperty(f)&&(a[f]=null);return b(a,f,function(){function a(b,c,d,f){f||(f=e);return function(){f[d||"push"]([b,c,arguments]);return t}}function b(a,c,d){d||(d=e);return function(b,e){e&&B(e)&&(e.$$moduleName=f);d.push([a,c,arguments]);return t}}if(!g)throw d("nomod", 10177f);var e=[],n=[],s=[],G=a("$injector","invoke","push",n),t={_invokeQueue:e,_configBlocks:n,_runBlocks:s,info:function(a){if(w(a)){if(!D(a))throw c("aobj","value");h=a;return this}return h},requires:g,name:f,provider:b("$provide","provider"),factory:b("$provide","factory"),service:b("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),decorator:b("$provide","decorator",n),animation:b("$animateProvider","register"),filter:b("$filterProvider","register"),controller:b("$controllerProvider", 10178"register"),directive:b("$compileProvider","directive"),component:b("$compileProvider","component"),config:G,run:function(a){s.push(a);return this}};k&&G(k);return t})}})}function ja(a,b){if(H(a)){b=b||[];for(var d=0,c=a.length;d<c;d++)b[d]=a[d]}else if(D(a))for(d in b=b||{},a)if("$"!==d.charAt(0)||"$"!==d.charAt(1))b[d]=a[d];return b||a}function Ne(a,b){var d=[];Yb(b)&&(a=ca.copy(a,null,b));return JSON.stringify(a,function(a,b){b=Sc(a,b);if(D(b)){if(0<=d.indexOf(b))return"...";d.push(b)}return b})} 10179function Oe(a){S(a,{errorHandlingConfig:ve,bootstrap:Wc,copy:Ia,extend:S,merge:xe,equals:va,element:x,forEach:r,injector:fb,noop:E,bind:Va,toJson:eb,fromJson:Tc,identity:Ta,isUndefined:A,isDefined:w,isString:C,isFunction:B,isObject:D,isNumber:X,isElement:ac,isArray:H,version:Pe,isDate:ha,callbacks:{$$counter:0},getTestability:He,reloadWithDebugInfo:Ge,UNSAFE_restoreLegacyJqLiteXHTMLReplacement:Ke,$$minErr:F,$$csp:Ba,$$encodeUriSegment:ic,$$encodeUriQuery:ba,$$lowercase:K,$$stringify:jc,$$uppercase:vb}); 10180lc=Me(z);lc("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:Qe});a.provider("$compile",Zc).directive({a:Re,input:$c,textarea:$c,form:Se,script:Te,select:Ue,option:Ve,ngBind:We,ngBindHtml:Xe,ngBindTemplate:Ye,ngClass:Ze,ngClassEven:$e,ngClassOdd:af,ngCloak:bf,ngController:cf,ngForm:df,ngHide:ef,ngIf:ff,ngInclude:gf,ngInit:hf,ngNonBindable:jf,ngPluralize:kf,ngRef:lf,ngRepeat:mf,ngShow:nf,ngStyle:of,ngSwitch:pf,ngSwitchWhen:qf,ngSwitchDefault:rf,ngOptions:sf,ngTransclude:tf,ngModel:uf, 10181ngList:vf,ngChange:wf,pattern:ad,ngPattern:ad,required:bd,ngRequired:bd,minlength:cd,ngMinlength:cd,maxlength:dd,ngMaxlength:dd,ngValue:xf,ngModelOptions:yf}).directive({ngInclude:zf,input:Af}).directive(wb).directive(ed);a.provider({$anchorScroll:Bf,$animate:Cf,$animateCss:Df,$$animateJs:Ef,$$animateQueue:Ff,$$AnimateRunner:Gf,$$animateAsyncRun:Hf,$browser:If,$cacheFactory:Jf,$controller:Kf,$document:Lf,$$isDocumentHidden:Mf,$exceptionHandler:Nf,$filter:fd,$$forceReflow:Of,$interpolate:Pf,$interval:Qf, 10182$$intervalFactory:Rf,$http:Sf,$httpParamSerializer:Tf,$httpParamSerializerJQLike:Uf,$httpBackend:Vf,$xhrFactory:Wf,$jsonpCallbacks:Xf,$location:Yf,$log:Zf,$parse:$f,$rootScope:ag,$q:bg,$$q:cg,$sce:dg,$sceDelegate:eg,$sniffer:fg,$$taskTrackerFactory:gg,$templateCache:hg,$templateRequest:ig,$$testability:jg,$timeout:kg,$window:lg,$$rAF:mg,$$jqLite:ng,$$Map:og,$$cookieReader:pg})}]).info({angularVersion:"1.8.
101822
vendor: 89,049 bytes, lines 10182-10357
10182"})}function xb(a,b){return b.toUpperCase()}function yb(a){return a.replace(qg,xb)}function mc(a){a= 10183a.nodeType;return 1===a||!a||9===a}function gd(a,b){var d,c,e,f=b.createDocumentFragment(),g=[],k;if(nc.test(a)){d=f.appendChild(b.createElement("div"));c=(rg.exec(a)||["",""])[1].toLowerCase();e=U.legacyXHTMLReplacement?a.replace(sg,"<$1></$2>"):a;if(10>wa)for(c=hb[c]||hb._default,d.innerHTML=c[1]+e+c[2],k=c[0];k--;)d=d.firstChild;else{c=qa[c]||[];for(k=c.length;-1<--k;)d.appendChild(z.document.createElement(c[k])),d=d.firstChild;d.innerHTML=e}g=db(g,d.childNodes);d=f.firstChild;d.textContent=""}else g.push(b.createTextNode(a)); 10184f.textContent="";f.innerHTML="";r(g,function(a){f.appendChild(a)});return f}function U(a){if(a instanceof U)return a;var b;C(a)&&(a=V(a),b=!0);if(!(this instanceof U)){if(b&&"<"!==a.charAt(0))throw oc("nosel");return new U(a)}if(b){b=z.document;var d;a=(d=tg.exec(a))?[b.createElement(d[1])]:(d=gd(a,b))?d.childNodes:[];pc(this,a)}else B(a)?hd(a):pc(this,a)}function qc(a){return a.cloneNode(!0)}function zb(a,b){!b&&mc(a)&&x.cleanData([a]);a.querySelectorAll&&x.cleanData(a.querySelectorAll("*"))}function id(a){for(var b in a)return!1; 10185return!0}function jd(a){var b=a.ng339,d=b&&Ka[b],c=d&&d.events,d=d&&d.data;d&&!id(d)||c&&!id(c)||(delete Ka[b],a.ng339=void 0)}function kd(a,b,d,c){if(w(c))throw oc("offargs");var e=(c=Ab(a))&&c.events,f=c&&c.handle;if(f){if(b){var g=function(b){var c=e[b];w(d)&&cb(c||[],d);w(d)&&c&&0<c.length||(a.removeEventListener(b,f),delete e[b])};r(b.split(" "),function(a){g(a);Bb[a]&&g(Bb[a])})}else for(b in e)"$destroy"!==b&&a.removeEventListener(b,f),delete e[b];jd(a)}}function rc(a,b){var d=a.ng339;if(d= 10186d&&Ka[d])b?delete d.data[b]:d.data={},jd(a)}function Ab(a,b){var d=a.ng339,d=d&&Ka[d];b&&!d&&(a.ng339=d=++ug,d=Ka[d]={events:{},data:{},handle:void 0});return d}function sc(a,b,d){if(mc(a)){var c,e=w(d),f=!e&&b&&!D(b),g=!b;a=(a=Ab(a,!f))&&a.data;if(e)a[yb(b)]=d;else{if(g)return a;if(f)return a&&a[yb(b)];for(c in b)a[yb(c)]=b[c]}}}function Cb(a,b){return a.getAttribute?-1<(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+b+" "):!1}function Db(a,b){if(b&&a.setAttribute){var d= 10187(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," "),c=d;r(b.split(" "),function(a){a=V(a);c=c.replace(" "+a+" "," ")});c!==d&&a.setAttribute("class",V(c))}}function Eb(a,b){if(b&&a.setAttribute){var d=(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," "),c=d;r(b.split(" "),function(a){a=V(a);-1===c.indexOf(" "+a+" ")&&(c+=a+" ")});c!==d&&a.setAttribute("class",V(c))}}function pc(a,b){if(b)if(b.nodeType)a[a.length++]=b;else{var d=b.length;if("number"===typeof d&&b.window!==b){if(d)for(var c= 101880;c<d;c++)a[a.length++]=b[c]}else a[a.length++]=b}}function ld(a,b){return Fb(a,"$"+(b||"ngController")+"Controller")}function Fb(a,b,d){9===a.nodeType&&(a=a.documentElement);for(b=H(b)?b:[b];a;){for(var c=0,e=b.length;c<e;c++)if(w(d=x.data(a,b[c])))return d;a=a.parentNode||11===a.nodeType&&a.host}}function md(a){for(zb(a,!0);a.firstChild;)a.removeChild(a.firstChild)}function Gb(a,b){b||zb(a);var d=a.parentNode;d&&d.removeChild(a)}function vg(a,b){b=b||z;if("complete"===b.document.readyState)b.setTimeout(a); 10189else x(b).on("load",a)}function hd(a){function b(){z.document.removeEventListener("DOMContentLoaded",b);z.removeEventListener("load",b);a()}"complete"===z.document.readyState?z.setTimeout(a):(z.document.addEventListener("DOMContentLoaded",b),z.addEventListener("load",b))}function nd(a,b){var d=Hb[b.toLowerCase()];return d&&od[ua(a)]&&d}function wg(a,b){var d=function(c,d){c.isDefaultPrevented=function(){return c.defaultPrevented};var f=b[d||c.type],g=f?f.length:0;if(g){if(A(c.immediatePropagationStopped)){var k= 10190c.stopImmediatePropagation;c.stopImmediatePropagation=function(){c.immediatePropagationStopped=!0;c.stopPropagation&&c.stopPropagation();k&&k.call(c)}}c.isImmediatePropagationStopped=function(){return!0===c.immediatePropagationStopped};var h=f.specialHandlerWrapper||xg;1<g&&(f=ja(f));for(var l=0;l<g;l++)c.isImmediatePropagationStopped()||h(a,c,f[l])}};d.elem=a;return d}function xg(a,b,d){d.call(a,b)}function yg(a,b,d){var c=b.relatedTarget;c&&(c===a||zg.call(a,c))||d.call(a,b)}function ng(){this.$get= 10191function(){return S(U,{hasClass:function(a,b){a.attr&&(a=a[0]);return Cb(a,b)},addClass:function(a,b){a.attr&&(a=a[0]);return Eb(a,b)},removeClass:function(a,b){a.attr&&(a=a[0]);return Db(a,b)}})}}function La(a,b){var d=a&&a.$$hashKey;if(d)return"function"===typeof d&&(d=a.$$hashKey()),d;d=typeof a;return d="function"===d||"object"===d&&null!==a?a.$$hashKey=d+":"+(b||we)():d+":"+a}function pd(){this._keys=[];this._values=[];this._lastKey=NaN;this._lastIndex=-1}function qd(a){a=Function.prototype.toString.call(a).replace(Ag, 10192"");return a.match(Bg)||a.match(Cg)}function Dg(a){return(a=qd(a))?"function("+(a[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function fb(a,b){function d(a){return function(b,c){if(D(b))r(b,Zb(a));else return a(b,c)}}function c(a,b){Ja(a,"service");if(B(b)||H(b))b=n.instantiate(b);if(!b.$get)throw Ca("pget",a);return p[a+"Provider"]=b}function e(a,b){return function(){var c=t.invoke(b,this);if(A(c))throw Ca("undef",a);return c}}function f(a,b,d){return c(a,{$get:!1!==d?e(a,b):b})}function g(a){gb(A(a)|| 10193H(a),"modulesToLoad","not an array");var b=[],c;r(a,function(a){function d(a){var b,c;b=0;for(c=a.length;b<c;b++){var e=a[b],f=n.get(e[0]);f[e[1]].apply(f,e[2])}}if(!m.get(a)){m.set(a,!0);try{C(a)?(c=lc(a),t.modules[a]=c,b=b.concat(g(c.requires)).concat(c._runBlocks),d(c._invokeQueue),d(c._configBlocks)):B(a)?b.push(n.invoke(a)):H(a)?b.push(n.invoke(a)):tb(a,"module")}catch(e){throw H(a)&&(a=a[a.length-1]),e.message&&e.stack&&-1===e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Ca("modulerr", 10194a,e.stack||e.message||e);}}});return b}function k(a,c){function d(b,e){if(a.hasOwnProperty(b)){if(a[b]===h)throw Ca("cdep",b+" <- "+l.join(" <- "));return a[b]}try{return l.unshift(b),a[b]=h,a[b]=c(b,e),a[b]}catch(f){throw a[b]===h&&delete a[b],f;}finally{l.shift()}}function e(a,c,f){var g=[];a=fb.$$annotate(a,b,f);for(var h=0,k=a.length;h<k;h++){var l=a[h];if("string"!==typeof l)throw Ca("itkn",l);g.push(c&&c.hasOwnProperty(l)?c[l]:d(l,f))}return g}return{invoke:function(a,b,c,d){"string"===typeof c&& 10195(d=c,c=null);c=e(a,c,d);H(a)&&(a=a[a.length-1]);d=a;if(wa||"function"!==typeof d)d=!1;else{var f=d.$$ngIsClass;Ga(f)||(f=d.$$ngIsClass=/^class\b/.test(Function.prototype.toString.call(d)));d=f}return d?(c.unshift(null),new (Function.prototype.bind.apply(a,c))):a.apply(b,c)},instantiate:function(a,b,c){var d=H(a)?a[a.length-1]:a;a=e(a,b,c);a.unshift(null);return new (Function.prototype.bind.apply(d,a))},get:d,annotate:fb.$$annotate,has:function(b){return p.hasOwnProperty(b+"Provider")||a.hasOwnProperty(b)}}} 10196b=!0===b;var h={},l=[],m=new Ib,p={$provide:{provider:d(c),factory:d(f),service:d(function(a,b){return f(a,["$injector",function(a){return a.instantiate(b)}])}),value:d(function(a,b){return f(a,ia(b),!1)}),constant:d(function(a,b){Ja(a,"constant");p[a]=b;s[a]=b}),decorator:function(a,b){var c=n.get(a+"Provider"),d=c.$get;c.$get=function(){var a=t.invoke(d,c);return t.invoke(b,null,{$delegate:a})}}}},n=p.$injector=k(p,function(a,b){ca.isString(b)&&l.push(b);throw Ca("unpr",l.join(" <- "));}),s={}, 10197G=k(s,function(a,b){var c=n.get(a+"Provider",b);return t.invoke(c.$get,c,void 0,a)}),t=G;p.$injectorProvider={$get:ia(G)};t.modules=n.modules=T();var N=g(a),t=G.get("$injector");t.strictDi=b;r(N,function(a){a&&t.invoke(a)});t.loadNewModules=function(a){r(g(a),function(a){a&&t.invoke(a)})};return t}function Bf(){var a=!0;this.disableAutoScrolling=function(){a=!1};this.$get=["$window","$location","$rootScope",function(b,d,c){function e(a){var b=null;Array.prototype.some.call(a,function(a){if("a"=== 10198ua(a))return b=a,!0});return b}function f(a){if(a){a.scrollIntoView();var c;c=g.yOffset;B(c)?c=c():ac(c)?(c=c[0],c="fixed"!==b.getComputedStyle(c).position?0:c.getBoundingClientRect().bottom):X(c)||(c=0);c&&(a=a.getBoundingClientRect().top,b.scrollBy(0,a-c))}else b.scrollTo(0,0)}function g(a){a=C(a)?a:X(a)?a.toString():d.hash();var b;a?(b=k.getElementById(a))?f(b):(b=e(k.getElementsByName(a)))?f(b):"top"===a&&f(null):f(null)}var k=b.document;a&&c.$watch(function(){return d.hash()},function(a,b){a=== 10199b&&""===a||vg(function(){c.$evalAsync(g)})});return g}]}function ib(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;H(a)&&(a=a.join(" "));H(b)&&(b=b.join(" "));return a+" "+b}function Eg(a){C(a)&&(a=a.split(" "));var b=T();r(a,function(a){a.length&&(b[a]=!0)});return b}function ra(a){return D(a)?a:{}}function Fg(a,b,d,c,e){function f(){pa=null;k()}function g(){t=y();t=A(t)?null:t;va(t,P)&&(t=P);N=P=t}function k(){var a=N;g();if(v!==h.url()||a!==t)v=h.url(),N=t,r(J,function(a){a(h.url(),t)})} 10200var h=this,l=a.location,m=a.history,p=a.setTimeout,n=a.clearTimeout,s={},G=e(d);h.isMock=!1;h.$$completeOutstandingRequest=G.completeTask;h.$$incOutstandingRequestCount=G.incTaskCount;h.notifyWhenNoOutstandingRequests=G.notifyWhenNoPendingTasks;var t,N,v=l.href,kc=b.find("base"),pa=null,y=c.history?function(){try{return m.state}catch(a){}}:E;g();h.url=function(b,d,e){A(e)&&(e=null);l!==a.location&&(l=a.location);m!==a.history&&(m=a.history);if(b){var f=N===e;b=ga(b).href;if(v===b&&(!c.history||f))return h; 10201var k=v&&Da(v)===Da(b);v=b;N=e;!c.history||k&&f?(k||(pa=b),d?l.replace(b):k?(d=l,e=b,f=e.indexOf("#"),e=-1===f?"":e.substr(f),d.hash=e):l.href=b,l.href!==b&&(pa=b)):(m[d?"replaceState":"pushState"](e,"",b),g());pa&&(pa=b);return h}return(pa||l.href).replace(/#$/,"")};h.state=function(){return t};var J=[],I=!1,P=null;h.onUrlChange=function(b){if(!I){if(c.history)x(a).on("popstate",f);x(a).on("hashchange",f);I=!0}J.push(b);return b};h.$$applicationDestroyed=function(){x(a).off("hashchange popstate", 10202f)};h.$$checkUrlChange=k;h.baseHref=function(){var a=kc.attr("href");return a?a.replace(/^(https?:)?\/\/[^/]*/,""):""};h.defer=function(a,b,c){var d;b=b||0;c=c||G.DEFAULT_TASK_TYPE;G.incTaskCount(c);d=p(function(){delete s[d];G.completeTask(a,c)},b);s[d]=c;return d};h.defer.cancel=function(a){if(s.hasOwnProperty(a)){var b=s[a];delete s[a];n(a);G.completeTask(E,b);return!0}return!1}}function If(){this.$get=["$window","$log","$sniffer","$document","$$taskTrackerFactory",function(a,b,d,c,e){return new Fg(a, 10203c,b,d,e)}]}function Jf(){this.$get=function(){function a(a,c){function e(a){a!==p&&(n?n===a&&(n=a.n):n=a,f(a.n,a.p),f(a,p),p=a,p.n=null)}function f(a,b){a!==b&&(a&&(a.p=b),b&&(b.n=a))}if(a in b)throw F("$cacheFactory")("iid",a);var g=0,k=S({},c,{id:a}),h=T(),l=c&&c.capacity||Number.MAX_VALUE,m=T(),p=null,n=null;return b[a]={put:function(a,b){if(!A(b)){if(l<Number.MAX_VALUE){var c=m[a]||(m[a]={key:a});e(c)}a in h||g++;h[a]=b;g>l&&this.remove(n.key);return b}},get:function(a){if(l<Number.MAX_VALUE){var b= 10204m[a];if(!b)return;e(b)}return h[a]},remove:function(a){if(l<Number.MAX_VALUE){var b=m[a];if(!b)return;b===p&&(p=b.p);b===n&&(n=b.n);f(b.n,b.p);delete m[a]}a in h&&(delete h[a],g--)},removeAll:function(){h=T();g=0;m=T();p=n=null},destroy:function(){m=k=h=null;delete b[a]},info:function(){return S({},k,{size:g})}}}var b={};a.info=function(){var a={};r(b,function(b,e){a[e]=b.info()});return a};a.get=function(a){return b[a]};return a}}function hg(){this.$get=["$cacheFactory",function(a){return a("templates")}]} 10205function Zc(a,b){function d(a,b,c){var d=/^([@&]|[=<](\*?))(\??)\s*([\w$]*)$/,e=T();r(a,function(a,f){a=a.trim();if(a in p)e[f]=p[a];else{var g=a.match(d);if(!g)throw $("iscp",b,f,a,c?"controller bindings definition":"isolate scope definition");e[f]={mode:g[1][0],collection:"*"===g[2],optional:"?"===g[3],attrName:g[4]||f};g[4]&&(p[a]=e[f])}});return e}function c(a){var b=a.charAt(0);if(!b||b!==K(b))throw $("baddir",a);if(a!==a.trim())throw $("baddir",a);}function e(a){var b=a.require||a.controller&& 10206a.name;!H(b)&&D(b)&&r(b,function(a,c){var d=a.match(l);a.substring(d[0].length)||(b[c]=d[0]+c)});return b}var f={},g=/^\s*directive:\s*([\w-]+)\s+(.*)$/,k=/(([\w-]+)(?::([^;]+))?;?)/,h=Ae("ngSrc,ngSrcset,src,srcset"),l=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,m=/^(on[a-z]+|formaction)$/,p=T();this.directive=function pa(b,d){gb(b,"name");Ja(b,"directive");C(b)?(c(b),gb(d,"directiveFactory"),f.hasOwnProperty(b)||(f[b]=[],a.factory(b+"Directive",["$injector","$exceptionHandler",function(a,c){var d=[];r(f[b],function(f, 10207g){try{var h=a.invoke(f);B(h)?h={compile:ia(h)}:!h.compile&&h.link&&(h.compile=ia(h.link));h.priority=h.priority||0;h.index=g;h.name=h.name||b;h.require=e(h);var k=h,l=h.restrict;if(l&&(!C(l)||!/[EACM]/.test(l)))throw $("badrestrict",l,b);k.restrict=l||"EA";h.$$moduleName=f.$$moduleName;d.push(h)}catch(m){c(m)}});return d}])),f[b].push(d)):r(b,Zb(pa));return this};this.component=function y(a,b){function c(a){function e(b){return B(b)||H(b)?function(c,d){return a.invoke(b,this,{$element:c,$attrs:d})}: 10208b}var f=b.template||b.templateUrl?b.template:"",g={controller:d,controllerAs:Gg(b.controller)||b.controllerAs||"$ctrl",template:e(f),templateUrl:e(b.templateUrl),transclude:b.transclude,scope:{},bindToController:b.bindings||{},restrict:"E",require:b.require};r(b,function(a,b){"$"===b.charAt(0)&&(g[b]=a)});return g}if(!C(a))return r(a,Zb(Va(this,y))),this;var d=b.controller||function(){};r(b,function(a,b){"$"===b.charAt(0)&&(c[b]=a,B(d)&&(d[b]=a))});c.$inject=["$injector"];return this.directive(a, 10209c)};this.aHrefSanitizationTrustedUrlList=function(a){return w(a)?(b.aHrefSanitizationTrustedUrlList(a),this):b.aHrefSanitizationTrustedUrlList()};Object.defineProperty(this,"aHrefSanitizationWhitelist",{get:function(){return this.aHrefSanitizationTrustedUrlList},set:function(a){this.aHrefSanitizationTrustedUrlList=a}});this.imgSrcSanitizationTrustedUrlList=function(a){return w(a)?(b.imgSrcSanitizationTrustedUrlList(a),this):b.imgSrcSanitizationTrustedUrlList()};Object.defineProperty(this,"imgSrcSanitizationWhitelist", 10210{get:function(){return this.imgSrcSanitizationTrustedUrlList},set:function(a){this.imgSrcSanitizationTrustedUrlList=a}});var n=!0;this.debugInfoEnabled=function(a){return w(a)?(n=a,this):n};var s=!1;this.strictComponentBindingsEnabled=function(a){return w(a)?(s=a,this):s};var G=10;this.onChangesTtl=function(a){return arguments.length?(G=a,this):G};var t=!0;this.commentDirectivesEnabled=function(a){return arguments.length?(t=a,this):t};var N=!0;this.cssClassDirectivesEnabled=function(a){return arguments.length? 10211(N=a,this):N};var v=T();this.addPropertySecurityContext=function(a,b,c){var d=a.toLowerCase()+"|"+b.toLowerCase();if(d in v&&v[d]!==c)throw $("ctxoverride",a,b,v[d],c);v[d]=c;return this};(function(){function a(b,c){r(c,function(a){v[a.toLowerCase()]=b})}a(W.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]);a(W.CSS,["*|style"]);a(W.URL,"area|href area|ping a|href a|ping blockquote|cite body|background del|cite input|src ins|cite q|cite".split(" "));a(W.MEDIA_URL,"audio|src img|src img|srcset source|src source|srcset track|src video|src video|poster".split(" ")); 10212a(W.RESOURCE_URL,"*|formAction applet|code applet|codebase base|href embed|src frame|src form|action head|profile html|manifest iframe|src link|href media|src object|codebase object|data script|src".split(" "))})();this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$sce","$animate",function(a,b,c,e,p,M,L,u,R){function q(){try{if(!--Ja)throw Ua=void 0,$("infchng",G);L.$apply(function(){for(var a=0,b=Ua.length;a<b;++a)try{Ua[a]()}catch(d){c(d)}Ua= 10213void 0})}finally{Ja++}}function ma(a,b){if(!a)return a;if(!C(a))throw $("srcset",b,a.toString());for(var c="",d=V(a),e=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,e=/\s/.test(d)?e:/(,)/,d=d.split(e),e=Math.floor(d.length/2),f=0;f<e;f++)var g=2*f,c=c+u.getTrustedMediaUrl(V(d[g])),c=c+(" "+V(d[g+1]));d=V(d[2*f]).split(/\s/);c+=u.getTrustedMediaUrl(V(d[0]));2===d.length&&(c+=" "+V(d[1]));return c}function w(a,b){if(b){var c=Object.keys(b),d,e,f;d=0;for(e=c.length;d<e;d++)f=c[d],this[f]=b[f]}else this.$attr= 10214{};this.$$element=a}function O(a,b,c){Fa.innerHTML="<span "+b+">";b=Fa.firstChild.attributes;var d=b[0];b.removeNamedItem(d.name);d.value=c;a.attributes.setNamedItem(d)}function sa(a,b){try{a.addClass(b)}catch(c){}}function da(a,b,c,d,e){a instanceof x||(a=x(a));var f=Xa(a,b,a,c,d,e);da.$$addScopeClass(a);var g=null;return function(b,c,d){if(!a)throw $("multilink");gb(b,"scope");e&&e.needsNewScope&&(b=b.$parent.$new());d=d||{};var h=d.parentBoundTranscludeFn,k=d.transcludeControllers;d=d.futureParentElement; 10215h&&h.$$boundTransclude&&(h=h.$$boundTransclude);g||(g=(d=d&&d[0])?"foreignobject"!==ua(d)&&la.call(d).match(/SVG/)?"svg":"html":"html");d="html"!==g?x(ja(g,x("<div></div>").append(a).html())):c?Wa.clone.call(a):a;if(k)for(var l in k)d.data("$"+l+"Controller",k[l].instance);da.$$addScopeInfo(d,b);c&&c(d,b);f&&f(b,d,d,h);c||(a=f=null);return d}}function Xa(a,b,c,d,e,f){function g(a,c,d,e){var f,k,l,m,p,I,t;if(n)for(t=Array(c.length),m=0;m<h.length;m+=3)f=h[m],t[f]=c[f];else t=c;m=0;for(p=h.length;m< 10216p;)k=t[h[m++]],c=h[m++],f=h[m++],c?(c.scope?(l=a.$new(),da.$$addScopeInfo(x(k),l)):l=a,I=c.transcludeOnThisElement?ka(a,c.transclude,e):!c.templateOnThisElement&&e?e:!e&&b?ka(a,b):null,c(f,l,k,d,I)):f&&f(a,k.childNodes,void 0,e)}for(var h=[],k=H(a)||a instanceof x,l,m,p,I,n,t=0;t<a.length;t++){l=new w;11===wa&&jb(a,t,k);m=tc(a[t],[],l,0===t?d:void 0,e);(f=m.length?aa(m,a[t],l,b,c,null,[],[],f):null)&&f.scope&&da.$$addScopeClass(l.$$element);l=f&&f.terminal||!(p=a[t].childNodes)||!p.length?null:Xa(p, 10217f?(f.transcludeOnThisElement||!f.templateOnThisElement)&&f.transclude:b);if(f||l)h.push(t,f,l),I=!0,n=n||f;f=null}return I?g:null}function jb(a,b,c){var d=a[b],e=d.parentNode,f;if(d.nodeType===Pa)for(;;){f=e?d.nextSibling:a[b+1];if(!f||f.nodeType!==Pa)break;d.nodeValue+=f.nodeValue;f.parentNode&&f.parentNode.removeChild(f);c&&f===a[b+1]&&a.splice(b+1,1)}}function ka(a,b,c){function d(e,f,g,h,k){e||(e=a.$new(!1,k),e.$$transcluded=!0);return b(e,f,{parentBoundTranscludeFn:c,transcludeControllers:g, 10218futureParentElement:h})}var e=d.$$slots=T(),f;for(f in b.$$slots)e[f]=b.$$slots[f]?ka(a,b.$$slots[f],c):null;return d}function tc(a,b,d,e,f){var g=d.$attr,h;switch(a.nodeType){case 1:h=ua(a);Y(b,xa(h),"E",e,f);for(var l,m,n,t,J,s=a.attributes,v=0,G=s&&s.length;v<G;v++){var P=!1,N=!1,r=!1,y=!1,u=!1,M;l=s[v];m=l.name;t=l.value;n=xa(m.toLowerCase());(J=n.match(Ra))?(r="Attr"===J[1],y="Prop"===J[1],u="On"===J[1],m=m.replace(rd,"").toLowerCase().substr(4+J[1].length).replace(/_(.)/g,function(a,b){return b.toUpperCase()})): 10219(M=n.match(Sa))&&ca(M[1])&&(P=m,N=m.substr(0,m.length-5)+"end",m=m.substr(0,m.length-6));if(y||u)d[n]=t,g[n]=l.name,y?Ea(a,b,n,m):b.push(sd(p,L,c,n,m,!1));else{n=xa(m.toLowerCase());g[n]=m;if(r||!d.hasOwnProperty(n))d[n]=t,nd(a,n)&&(d[n]=!0);Ia(a,b,t,n,r);Y(b,n,"A",e,f,P,N)}}"input"===h&&"hidden"===a.getAttribute("type")&&a.setAttribute("autocomplete","off");if(!Qa)break;g=a.className;D(g)&&(g=g.animVal);if(C(g)&&""!==g)for(;a=k.exec(g);)n=xa(a[2]),Y(b,n,"C",e,f)&&(d[n]=V(a[3])),g=g.substr(a.index+ 10220a[0].length);break;case Pa:na(b,a.nodeValue);break;case 8:if(!Oa)break;F(a,b,d,e,f)}b.sort(ia);return b}function F(a,b,c,d,e){try{var f=g.exec(a.nodeValue);if(f){var h=xa(f[1]);Y(b,h,"M",d,e)&&(c[h]=V(f[2]))}}catch(k){}}function U(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw $("uterdir",b,c);1===a.nodeType&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--);d.push(a);a=a.nextSibling}while(0<e)}else d.push(a);return x(d)}function W(a,b,c){return function(d,e,f,g,h){e=U(e[0], 10221b,c);return a(d,e,f,g,h)}}function Z(a,b,c,d,e,f){var g;return a?da(b,c,d,e,f):function(){g||(g=da(b,c,d,e,f),b=c=f=null);return g.apply(this,arguments)}}function aa(a,b,d,e,f,g,h,k,l){function m(a,b,c,d){if(a){c&&(a=W(a,c,d));a.require=u.require;a.directiveName=Q;if(s===u||u.$$isolateScope)a=Ba(a,{isolateScope:!0});h.push(a)}if(b){c&&(b=W(b,c,d));b.require=u.require;b.directiveName=Q;if(s===u||u.$$isolateScope)b=Ba(b,{isolateScope:!0});k.push(b)}}function p(a,e,f,g,l){function m(a,b,c,d){var e;bb(a)|| 10222(d=c,c=b,b=a,a=void 0);N&&(e=P);c||(c=N?Q.parent():Q);if(d){var f=l.$$slots[d];if(f)return f(a,b,e,c,R);if(A(f))throw $("noslot",d,Aa(Q));}else return l(a,b,e,c,R)}var n,u,L,y,G,P,M,Q;b===f?(g=d,Q=d.$$element):(Q=x(f),g=new w(Q,d));G=e;s?y=e.$new(!0):t&&(G=e.$parent);l&&(M=m,M.$$boundTransclude=l,M.isSlotFilled=function(a){return!!l.$$slots[a]});J&&(P=ea(Q,g,M,J,y,e,s));s&&(da.$$addScopeInfo(Q,y,!0,!(v&&(v===s||v===s.$$originalDirective))),da.$$addScopeClass(Q,!0),y.$$isolateBindings=s.$$isolateBindings, 10223u=Da(e,g,y,y.$$isolateBindings,s),u.removeWatches&&y.$on("$destroy",u.removeWatches));for(n in P){u=J[n];L=P[n];var Hg=u.$$bindings.bindToController;L.instance=L();Q.data("$"+u.name+"Controller",L.instance);L.bindingInfo=Da(G,g,L.instance,Hg,u)}r(J,function(a,b){var c=a.require;a.bindToController&&!H(c)&&D(c)&&S(P[b].instance,X(b,c,Q,P))});r(P,function(a){var b=a.instance;if(B(b.$onChanges))try{b.$onChanges(a.bindingInfo.initialChanges)}catch(d){c(d)}if(B(b.$onInit))try{b.$onInit()}catch(e){c(e)}B(b.$doCheck)&& 10224(G.$watch(function(){b.$doCheck()}),b.$doCheck());B(b.$onDestroy)&&G.$on("$destroy",function(){b.$onDestroy()})});n=0;for(u=h.length;n<u;n++)L=h[n],Ca(L,L.isolateScope?y:e,Q,g,L.require&&X(L.directiveName,L.require,Q,P),M);var R=e;s&&(s.template||null===s.templateUrl)&&(R=y);a&&a(R,f.childNodes,void 0,l);for(n=k.length-1;0<=n;n--)L=k[n],Ca(L,L.isolateScope?y:e,Q,g,L.require&&X(L.directiveName,L.require,Q,P),M);r(P,function(a){a=a.instance;B(a.$postLink)&&a.$postLink()})}l=l||{};for(var n=-Number.MAX_VALUE, 10225t=l.newScopeDirective,J=l.controllerDirectives,s=l.newIsolateScopeDirective,v=l.templateDirective,L=l.nonTlbTranscludeDirective,G=!1,P=!1,N=l.hasElementTranscludeDirective,y=d.$$element=x(b),u,Q,M,R=e,q,ma=!1,Jb=!1,O,sa=0,C=a.length;sa<C;sa++){u=a[sa];var E=u.$$start,jb=u.$$end;E&&(y=U(b,E,jb));M=void 0;if(n>u.priority)break;if(O=u.scope)u.templateUrl||(D(O)?(ba("new/isolated scope",s||t,u,y),s=u):ba("new/isolated scope",s,u,y)),t=t||u;Q=u.name;if(!ma&&(u.replace&&(u.templateUrl||u.template)||u.transclude&& 10226!u.$$tlb)){for(O=sa+1;ma=a[O++];)if(ma.transclude&&!ma.$$tlb||ma.replace&&(ma.templateUrl||ma.template)){Jb=!0;break}ma=!0}!u.templateUrl&&u.controller&&(J=J||T(),ba("'"+Q+"' controller",J[Q],u,y),J[Q]=u);if(O=u.transclude)if(G=!0,u.$$tlb||(ba("transclusion",L,u,y),L=u),"element"===O)N=!0,n=u.priority,M=y,y=d.$$element=x(da.$$createComment(Q,d[Q])),b=y[0],oa(f,Ha.call(M,0),b),R=Z(Jb,M,e,n,g&&g.name,{nonTlbTranscludeDirective:L});else{var ka=T();if(D(O)){M=z.document.createDocumentFragment();var Xa= 10227T(),F=T();r(O,function(a,b){var c="?"===a.charAt(0);a=c?a.substring(1):a;Xa[a]=b;ka[b]=null;F[b]=c});r(y.contents(),function(a){var b=Xa[xa(ua(a))];b?(F[b]=!0,ka[b]=ka[b]||z.document.createDocumentFragment(),ka[b].appendChild(a)):M.appendChild(a)});r(F,function(a,b){if(!a)throw $("reqslot",b);});for(var K in ka)ka[K]&&(R=x(ka[K].childNodes),ka[K]=Z(Jb,R,e));M=x(M.childNodes)}else M=x(qc(b)).contents();y.empty();R=Z(Jb,M,e,void 0,void 0,{needsNewScope:u.$$isolateScope||u.$$newScope});R.$$slots=ka}if(u.template)if(P= 10228!0,ba("template",v,u,y),v=u,O=B(u.template)?u.template(y,d):u.template,O=Na(O),u.replace){g=u;M=nc.test(O)?td(ja(u.templateNamespace,V(O))):[];b=M[0];if(1!==M.length||1!==b.nodeType)throw $("tplrt",Q,"");oa(f,y,b);C={$attr:{}};O=tc(b,[],C);var Ig=a.splice(sa+1,a.length-(sa+1));(s||t)&&fa(O,s,t);a=a.concat(O).concat(Ig);ga(d,C);C=a.length}else y.html(O);if(u.templateUrl)P=!0,ba("template",v,u,y),v=u,u.replace&&(g=u),p=ha(a.splice(sa,a.length-sa),y,d,f,G&&R,h,k,{controllerDirectives:J,newScopeDirective:t!== 10229u&&t,newIsolateScopeDirective:s,templateDirective:v,nonTlbTranscludeDirective:L}),C=a.length;else if(u.compile)try{q=u.compile(y,d,R);var Y=u.$$originalDirective||u;B(q)?m(null,Va(Y,q),E,jb):q&&m(Va(Y,q.pre),Va(Y,q.post),E,jb)}catch(ca){c(ca,Aa(y))}u.terminal&&(p.terminal=!0,n=Math.max(n,u.priority))}p.scope=t&&!0===t.scope;p.transcludeOnThisElement=G;p.templateOnThisElement=P;p.transclude=R;l.hasElementTranscludeDirective=N;return p}function X(a,b,c,d){var e;if(C(b)){var f=b.match(l);b=b.substring(f[0].length); 10230var g=f[1]||f[3],f="?"===f[2];"^^"===g?c=c.parent():e=(e=d&&d[b])&&e.instance;if(!e){var h="$"+b+"Controller";e="^^"===g&&c[0]&&9===c[0].nodeType?null:g?c.inheritedData(h):c.data(h)}if(!e&&!f)throw $("ctreq",b,a);}else if(H(b))for(e=[],g=0,f=b.length;g<f;g++)e[g]=X(a,b[g],c,d);else D(b)&&(e={},r(b,function(b,f){e[f]=X(a,b,c,d)}));return e||null}function ea(a,b,c,d,e,f,g){var h=T(),k;for(k in d){var l=d[k],m={$scope:l===g||l.$$isolateScope?e:f,$element:a,$attrs:b,$transclude:c},p=l.controller;"@"=== 10231p&&(p=b[l.name]);m=M(p,m,!0,l.controllerAs);h[l.name]=m;a.data("$"+l.name+"Controller",m.instance)}return h}function fa(a,b,c){for(var d=0,e=a.length;d<e;d++)a[d]=bc(a[d],{$$isolateScope:b,$$newScope:c})}function Y(b,c,e,g,h,k,l){if(c===h)return null;var m=null;if(f.hasOwnProperty(c)){h=a.get(c+"Directive");for(var p=0,n=h.length;p<n;p++)if(c=h[p],(A(g)||g>c.priority)&&-1!==c.restrict.indexOf(e)){k&&(c=bc(c,{$$start:k,$$end:l}));if(!c.$$bindings){var I=m=c,t=c.name,u={isolateScope:null,bindToController:null}; 10232D(I.scope)&&(!0===I.bindToController?(u.bindToController=d(I.scope,t,!0),u.isolateScope={}):u.isolateScope=d(I.scope,t,!1));D(I.bindToController)&&(u.bindToController=d(I.bindToController,t,!0));if(u.bindToController&&!I.controller)throw $("noctrl",t);m=m.$$bindings=u;D(m.isolateScope)&&(c.$$isolateBindings=m.isolateScope)}b.push(c);m=c}}return m}function ca(b){if(f.hasOwnProperty(b))for(var c=a.get(b+"Directive"),d=0,e=c.length;d<e;d++)if(b=c[d],b.multiElement)return!0;return!1}function ga(a,b){var c= 10233b.$attr,d=a.$attr;r(a,function(d,e){"$"!==e.charAt(0)&&(b[e]&&b[e]!==d&&(d=d.length?d+(("style"===e?";":" ")+b[e]):b[e]),a.$set(e,d,!0,c[e]))});r(b,function(b,e){a.hasOwnProperty(e)||"$"===e.charAt(0)||(a[e]=b,"class"!==e&&"style"!==e&&(d[e]=c[e]))})}function ha(a,b,d,f,g,h,k,l){var m=[],p,n,t=b[0],u=a.shift(),J=bc(u,{templateUrl:null,transclude:null,replace:null,$$originalDirective:u}),s=B(u.templateUrl)?u.templateUrl(b,d):u.templateUrl,L=u.templateNamespace;b.empty();e(s).then(function(c){var e, 10234I;c=Na(c);if(u.replace){c=nc.test(c)?td(ja(L,V(c))):[];e=c[0];if(1!==c.length||1!==e.nodeType)throw $("tplrt",u.name,s);c={$attr:{}};oa(f,b,e);var v=tc(e,[],c);D(u.scope)&&fa(v,!0);a=v.concat(a);ga(d,c)}else e=t,b.html(c);a.unshift(J);p=aa(a,e,d,g,b,u,h,k,l);r(f,function(a,c){a===e&&(f[c]=b[0])});for(n=Xa(b[0].childNodes,g);m.length;){c=m.shift();I=m.shift();var y=m.shift(),P=m.shift(),v=b[0];if(!c.$$destroyed){if(I!==t){var G=I.className;l.hasElementTranscludeDirective&&u.replace||(v=qc(e));oa(y, 10235x(I),v);sa(x(v),G)}I=p.transcludeOnThisElement?ka(c,p.transclude,P):P;p(n,c,v,f,I)}}m=null}).catch(function(a){dc(a)&&c(a)});return function(a,b,c,d,e){a=e;b.$$destroyed||(m?m.push(b,c,d,a):(p.transcludeOnThisElement&&(a=ka(b,p.transclude,e)),p(n,b,c,d,a)))}}function ia(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.name<b.name?-1:1:a.index-b.index}function ba(a,b,c,d){function e(a){return a?" (module: "+a+")":""}if(b)throw $("multidir",b.name,e(b.$$moduleName),c.name,e(c.$$moduleName), 10236a,Aa(d));}function na(a,c){var d=b(c,!0);d&&a.push({priority:0,compile:function(a){a=a.parent();var b=!!a.length;b&&da.$$addBindingClass(a);return function(a,c){var e=c.parent();b||da.$$addBindingClass(e);da.$$addBindingInfo(e,d.expressions);a.$watch(d,function(a){c[0].nodeValue=a})}}})}function ja(a,b){a=K(a||"html");switch(a){case "svg":case "math":var c=z.document.createElement("div");c.innerHTML="<"+a+">"+b+"</"+a+">";return c.childNodes[0].childNodes;default:return b}}function qa(a,b){if("srcdoc"=== 10237b)return u.HTML;if("src"===b||"ngSrc"===b)return-1===["img","video","audio","source","track"].indexOf(a)?u.RESOURCE_URL:u.MEDIA_URL;if("xlinkHref"===b)return"image"===a?u.MEDIA_URL:"a"===a?u.URL:u.RESOURCE_URL;if("form"===a&&"action"===b||"base"===a&&"href"===b||"link"===a&&"href"===b)return u.RESOURCE_URL;if("a"===a&&("href"===b||"ngHref"===b))return u.URL}function ya(a,b){var c=b.toLowerCase();return v[a+"|"+c]||v["*|"+c]}function za(a){return ma(u.valueOf(a),"ng-prop-srcset")}function Ea(a,b,c, 10238d){if(m.test(d))throw $("nodomevents");a=ua(a);var e=ya(a,d),f=Ta;"srcset"!==d||"img"!==a&&"source"!==a?e&&(f=u.getTrusted.bind(u,e)):f=za;b.push({priority:100,compile:function(a,b){var e=p(b[c]),g=p(b[c],function(a){return u.valueOf(a)});return{pre:function(a,b){function c(){var g=e(a);b[0][d]=f(g)}c();a.$watch(g,c)}}}})}function Ia(a,c,d,e,f){var g=ua(a),k=qa(g,e),l=h[e]||f,p=b(d,!f,k,l);if(p){if("multiple"===e&&"select"===g)throw $("selmulti",Aa(a));if(m.test(e))throw $("nodomevents");c.push({priority:100, 10239compile:function(){return{pre:function(a,c,f){c=f.$$observers||(f.$$observers=T());var g=f[e];g!==d&&(p=g&&b(g,!0,k,l),d=g);p&&(f[e]=p(a),(c[e]||(c[e]=[])).$$inter=!0,(f.$$observers&&f.$$observers[e].$$scope||a).$watch(p,function(a,b){"class"===e&&a!==b?f.$updateClass(a,b):f.$set(e,a)}))}}}})}}function oa(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,h;if(a)for(g=0,h=a.length;g<h;g++)if(a[g]===d){a[g++]=c;h=g+e-1;for(var k=a.length;g<k;g++,h++)h<k?a[g]=a[h]:delete a[g];a.length-=e-1;a.context===d&& 10240(a.context=c);break}f&&f.replaceChild(c,d);a=z.document.createDocumentFragment();for(g=0;g<e;g++)a.appendChild(b[g]);x.hasData(d)&&(x.data(c,x.data(d)),x(d).off("$destroy"));x.cleanData(a.querySelectorAll("*"));for(g=1;g<e;g++)delete b[g];b[0]=c;b.length=1}function Ba(a,b){return S(function(){return a.apply(null,arguments)},a,b)}function Ca(a,b,d,e,f,g){try{a(b,d,e,f,g)}catch(h){c(h,Aa(d))}}function ra(a,b){if(s)throw $("missingattr",a,b);}function Da(a,c,d,e,f){function g(b,c,e){B(d.$onChanges)&& 10241!ec(c,e)&&(Ua||(a.$$postDigest(q),Ua=[]),m||(m={},Ua.push(h)),m[b]&&(e=m[b].previousValue),m[b]=new Kb(e,c))}function h(){d.$onChanges(m);m=void 0}var k=[],l={},m;r(e,function(e,h){var m=e.attrName,n=e.optional,I,t,u,s;switch(e.mode){case "@":n||ta.call(c,m)||(ra(m,f.name),d[h]=c[m]=void 0);n=c.$observe(m,function(a){if(C(a)||Ga(a))g(h,a,d[h]),d[h]=a});c.$$observers[m].$$scope=a;I=c[m];C(I)?d[h]=b(I)(a):Ga(I)&&(d[h]=I);l[h]=new Kb(uc,d[h]);k.push(n);break;case "=":if(!ta.call(c,m)){if(n)break;ra(m, 10242f.name);c[m]=void 0}if(n&&!c[m])break;t=p(c[m]);s=t.literal?va:ec;u=t.assign||function(){I=d[h]=t(a);throw $("nonassign",c[m],m,f.name);};I=d[h]=t(a);n=function(b){s(b,d[h])||(s(b,I)?u(a,b=d[h]):d[h]=b);return I=b};n.$stateful=!0;n=e.collection?a.$watchCollection(c[m],n):a.$watch(p(c[m],n),null,t.literal);k.push(n);break;case "<":if(!ta.call(c,m)){if(n)break;ra(m,f.name);c[m]=void 0}if(n&&!c[m])break;t=p(c[m]);var v=t.literal,L=d[h]=t(a);l[h]=new Kb(uc,d[h]);n=a[e.collection?"$watchCollection":"$watch"](t, 10243function(a,b){if(b===a){if(b===L||v&&va(b,L))return;b=L}g(h,a,b);d[h]=a});k.push(n);break;case "&":n||ta.call(c,m)||ra(m,f.name);t=c.hasOwnProperty(m)?p(c[m]):E;if(t===E&&n)break;d[h]=function(b){return t(a,b)}}});return{initialChanges:l,removeWatches:k.length&&function(){for(var a=0,b=k.length;a<b;++a)k[a]()}}}var Ma=/^\w/,Fa=z.document.createElement("div"),Oa=t,Qa=N,Ja=G,Ua;w.prototype={$normalize:xa,$addClass:function(a){a&&0<a.length&&R.addClass(this.$$element,a)},$removeClass:function(a){a&& 102440<a.length&&R.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=ud(a,b);c&&c.length&&R.addClass(this.$$element,c);(c=ud(b,a))&&c.length&&R.removeClass(this.$$element,c)},$set:function(a,b,d,e){var f=nd(this.$$element[0],a),g=vd[a],h=a;f?(this.$$element.prop(a,b),e=f):g&&(this[g]=b,h=g);this[a]=b;e?this.$attr[a]=e:(e=this.$attr[a])||(this.$attr[a]=e=Xc(a,"-"));"img"===ua(this.$$element)&&"srcset"===a&&(this[a]=b=ma(b,"$set('srcset', value)"));!1!==d&&(null===b||A(b)?this.$$element.removeAttr(e): 10245Ma.test(e)?f&&!1===b?this.$$element.removeAttr(e):this.$$element.attr(e,b):O(this.$$element[0],e,b));(a=this.$$observers)&&r(a[h],function(a){try{a(b)}catch(d){c(d)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers=T()),e=d[a]||(d[a]=[]);e.push(b);L.$evalAsync(function(){e.$$inter||!c.hasOwnProperty(a)||A(c[a])||b(c[a])});return function(){cb(e,b)}}};var Ka=b.startSymbol(),La=b.endSymbol(),Na="{{"===Ka&&"}}"===La?Ta:function(a){return a.replace(/\{\{/g,Ka).replace(/}}/g,La)},Ra= 10246/^ng(Attr|Prop|On)([A-Z].*)$/,Sa=/^(.+)Start$/;da.$$addBindingInfo=n?function(a,b){var c=a.data("$binding")||[];H(b)?c=c.concat(b):c.push(b);a.data("$binding",c)}:E;da.$$addBindingClass=n?function(a){sa(a,"ng-binding")}:E;da.$$addScopeInfo=n?function(a,b,c,d){a.data(c?d?"$isolateScopeNoTemplate":"$isolateScope":"$scope",b)}:E;da.$$addScopeClass=n?function(a,b){sa(a,b?"ng-isolate-scope":"ng-scope")}:E;da.$$createComment=function(a,b){var c="";n&&(c=" "+(a||"")+": ",b&&(c+=b+" "));return z.document.createComment(c)}; 10247return da}]}function Kb(a,b){this.previousValue=a;this.currentValue=b}function xa(a){return a.replace(rd,"").replace(Jg,function(a,d,c){return c?d.toUpperCase():d})}function ud(a,b){var d="",c=a.split(/\s+/),e=b.split(/\s+/),f=0;a:for(;f<c.length;f++){for(var g=c[f],k=0;k<e.length;k++)if(g===e[k])continue a;d+=(0<d.length?" ":"")+g}return d}function td(a){a=x(a);var b=a.length;if(1>=b)return a;for(;b--;){var d=a[b];(8===d.nodeType||d.nodeType===Pa&&""===d.nodeValue.trim())&&Kg.call(a,b,1)}return a} 10248function Gg(a,b){if(b&&C(b))return b;if(C(a)){var d=wd.exec(a);if(d)return d[3]}}function Kf(){var a={};this.has=function(b){return a.hasOwnProperty(b)};this.register=function(b,d){Ja(b,"controller");D(b)?S(a,b):a[b]=d};this.$get=["$injector",function(b){function d(a,b,d,g){if(!a||!D(a.$scope))throw F("$controller")("noscp",g,b);a.$scope[b]=d}return function(c,e,f,g){var k,h,l;f=!0===f;g&&C(g)&&(l=g);if(C(c)){g=c.match(wd);if(!g)throw xd("ctrlfmt",c);h=g[1];l=l||g[3];c=a.hasOwnProperty(h)?a[h]:Le(e.$scope, 10249h,!0);if(!c)throw xd("ctrlreg",h);tb(c,h,!0)}if(f)return f=(H(c)?c[c.length-1]:c).prototype,k=Object.create(f||null),l&&d(e,l,k,h||c.name),S(function(){var a=b.invoke(c,k,e,h);a!==k&&(D(a)||B(a))&&(k=a,l&&d(e,l,k,h||c.name));return k},{instance:k,identifier:l});k=b.instantiate(c,e,h);l&&d(e,l,k,h||c.name);return k}}]}function Lf(){this.$get=["$window",function(a){return x(a.document)}]}function Mf(){this.$get=["$document","$rootScope",function(a,b){function d(){e=c.hidden}var c=a[0],e=c&&c.hidden; 10250a.on("visibilitychange",d);b.$on("$destroy",function(){a.off("visibilitychange",d)});return function(){return e}}]}function Nf(){this.$get=["$log",function(a){return function(b,d){a.error.apply(a,arguments)}}]}function vc(a){return D(a)?ha(a)?a.toISOString():eb(a):a}function Tf(){this.$get=function(){return function(a){if(!a)return"";var b=[];Qc(a,function(a,c){null===a||A(a)||B(a)||(H(a)?r(a,function(a){b.push(ba(c)+"="+ba(vc(a)))}):b.push(ba(c)+"="+ba(vc(a))))});return b.join("&")}}}function Uf(){this.$get= 10251function(){return function(a){function b(a,e,f){H(a)?r(a,function(a,c){b(a,e+"["+(D(a)?c:"")+"]")}):D(a)&&!ha(a)?Qc(a,function(a,c){b(a,e+(f?"":"[")+c+(f?"":"]"))}):(B(a)&&(a=a()),d.push(ba(e)+"="+(null==a?"":ba(vc(a)))))}if(!a)return"";var d=[];b(a,"",!0);return d.join("&")}}}function wc(a,b){if(C(a)){var d=a.replace(Lg,"").trim();if(d){var c=b("Content-Type"),c=c&&0===c.indexOf(yd),e;(e=c)||(e=(e=d.match(Mg))&&Ng[e[0]].test(d));if(e)try{a=Tc(d)}catch(f){if(!c)return a;throw Lb("baddata",a,f);}}}return a} 10252function zd(a){var b=T(),d;C(a)?r(a.split("\n"),function(a){d=a.indexOf(":");var e=K(V(a.substr(0,d)));a=V(a.substr(d+1));e&&(b[e]=b[e]?b[e]+", "+a:a)}):D(a)&&r(a,function(a,d){var f=K(d),g=V(a);f&&(b[f]=b[f]?b[f]+", "+g:g)});return b}function Ad(a){var b;return function(d){b||(b=zd(a));return d?(d=b[K(d)],void 0===d&&(d=null),d):b}}function Bd(a,b,d,c){if(B(c))return c(a,b,d);r(c,function(c){a=c(a,b,d)});return a}function Sf(){var a=this.defaults={transformResponse:[wc],transformRequest:[function(a){return D(a)&& 10253"[object File]"!==la.call(a)&&"[object Blob]"!==la.call(a)&&"[object FormData]"!==la.call(a)?eb(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},post:ja(xc),put:ja(xc),patch:ja(xc)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer",jsonpCallbackParam:"callback"},b=!1;this.useApplyAsync=function(a){return w(a)?(b=!!a,this):b};var d=this.interceptors=[],c=this.xsrfTrustedOrigins=[];Object.defineProperty(this,"xsrfWhitelistedOrigins", 10254{get:function(){return this.xsrfTrustedOrigins},set:function(a){this.xsrfTrustedOrigins=a}});this.$get=["$browser","$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector","$sce",function(e,f,g,k,h,l,m,p){function n(b){function c(a,b){for(var d=0,e=b.length;d<e;){var f=b[d++],g=b[d++];a=a.then(f,g)}b.length=0;return a}function d(a,b){var c,e={};r(a,function(a,d){B(a)?(c=a(b),null!=c&&(e[d]=c)):e[d]=a});return e}function f(a){var b=S({},a);b.data=Bd(a.data,a.headers,a.status,g.transformResponse); 10255a=a.status;return 200<=a&&300>a?b:l.reject(b)}if(!D(b))throw F("$http")("badreq",b);if(!C(p.valueOf(b.url)))throw F("$http")("badreq",b.url);var g=S({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer,jsonpCallbackParam:a.jsonpCallbackParam},b);g.headers=function(b){var c=a.headers,e=S({},b.headers),f,g,h,c=S({},c.common,c[K(b.method)]);a:for(f in c){g=K(f);for(h in e)if(K(h)===g)continue a;e[f]=c[f]}return d(e,ja(b))}(b);g.method= 10256vb(g.method);g.paramSerializer=C(g.paramSerializer)?m.get(g.paramSerializer):g.paramSerializer;e.$$incOutstandingRequestCount("$http");var h=[],k=[];b=l.resolve(g);r(v,function(a){(a.request||a.requestError)&&h.unshift(a.request,a.requestError);(a.response||a.responseError)&&k.push(a.response,a.responseError)});b=c(b,h);b=b.then(function(b){var c=b.headers,d=Bd(b.data,Ad(c),void 0,b.transformRequest);A(d)&&r(c,function(a,b){"content-type"===K(b)&&delete c[b]});A(b.withCredentials)&&!A(a.withCredentials)&& 10257(b.withCredentials=a.withCredentials);return s(b,d).then(f,f)});b=c(b,k);return b=b.finally(function(){e.$$completeOutstandingRequest(E,"$http")})}function s(c,d){function e(a){if(a){var c={};r(a,function(a,d){c[d]=function(c){function d(){a(c)}b?h.$applyAsync(d):h.$$phase?d():h.$apply(d)}});return c}}function k(a,c,d,e,f){function g(){m(c,a,d,e,f)}R&&(200<=a&&300>a?R.put(O,[a,c,zd(d),e,f]):R.remove(O));b?h.$applyAsync(g):(g(),h.$$phase||h.$apply())}function m(a,b,d,e,f){b=-1<=b?b:0;(200<=b&&300> 10258b?L.resolve:L.reject)({data:a,status:b,headers:Ad(d),config:c,statusText:e,xhrStatus:f})}function s(a){m(a.data,a.status,ja(a.headers()),a.statusText,a.xhrStatus)}function v(){var a=n.pendingRequests.indexOf(c);-1!==a&&n.pendingRequests.splice(a,1)}var L=l.defer(),u=L.promise,R,q,ma=c.headers,x="jsonp"===K(c.method),O=c.url;x?O=p.getTrustedResourceUrl(O):C(O)||(O=p.valueOf(O));O=G(O,c.paramSerializer(c.params));x&&(O=t(O,c.jsonpCallbackParam));n.pendingRequests.push(c);u.then(v,v);!c.cache&&!a.cache|| 10259!1===c.cache||"GET"!==c.method&&"JSONP"!==c.method||(R=D(c.cache)?c.cache:D(a.cache)?a.cache:N);R&&(q=R.get(O),w(q)?q&&B(q.then)?q.then(s,s):H(q)?m(q[1],q[0],ja(q[2]),q[3],q[4]):m(q,200,{},"OK","complete"):R.put(O,u));A(q)&&((q=kc(c.url)?g()[c.xsrfCookieName||a.xsrfCookieName]:void 0)&&(ma[c.xsrfHeaderName||a.xsrfHeaderName]=q),f(c.method,O,d,k,ma,c.timeout,c.withCredentials,c.responseType,e(c.eventHandlers),e(c.uploadEventHandlers)));return u}function G(a,b){0<b.length&&(a+=(-1===a.indexOf("?")? 10260"?":"&")+b);return a}function t(a,b){var c=a.split("?");if(2<c.length)throw Lb("badjsonp",a);c=hc(c[1]);r(c,function(c,d){if("JSON_CALLBACK"===c)throw Lb("badjsonp",a);if(d===b)throw Lb("badjsonp",b,a);});return a+=(-1===a.indexOf("?")?"?":"&")+b+"=JSON_CALLBACK"}var N=k("$http");a.paramSerializer=C(a.paramSerializer)?m.get(a.paramSerializer):a.paramSerializer;var v=[];r(d,function(a){v.unshift(C(a)?m.get(a):m.invoke(a))});var kc=Og(c);n.pendingRequests=[];(function(a){r(arguments,function(a){n[a]= 10261function(b,c){return n(S({},c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){r(arguments,function(a){n[a]=function(b,c,d){return n(S({},d||{},{method:a,url:b,data:c}))}})})("post","put","patch");n.defaults=a;return n}]}function Wf(){this.$get=function(){return function(){return new z.XMLHttpRequest}}}function Vf(){this.$get=["$browser","$jsonpCallbacks","$document","$xhrFactory",function(a,b,d,c){return Pg(a,c,a.defer,b,d[0])}]}function Pg(a,b,d,c,e){function f(a,b,d){a=a.replace("JSON_CALLBACK", 10262b);var f=e.createElement("script"),m=null;f.type="text/javascript";f.src=a;f.async=!0;m=function(a){f.removeEventListener("load",m);f.removeEventListener("error",m);e.body.removeChild(f);f=null;var g=-1,s="unknown";a&&("load"!==a.type||c.wasCalled(b)||(a={type:"error"}),s=a.type,g="error"===a.type?404:200);d&&d(g,s)};f.addEventListener("load",m);f.addEventListener("error",m);e.body.appendChild(f);return m}return function(e,k,h,l,m,p,n,s,G,t){function N(a){J="timeout"===a;pa&&pa();y&&y.abort()}function v(a, 10263b,c,e,f,g){w(P)&&d.cancel(P);pa=y=null;a(b,c,e,f,g)}k=k||a.url();if("jsonp"===K(e))var q=c.createCallback(k),pa=f(k,q,function(a,b){var d=200===a&&c.getResponse(q);v(l,a,d,"",b,"complete");c.removeCallback(q)});else{var y=b(e,k),J=!1;y.open(e,k,!0);r(m,function(a,b){w(a)&&y.setRequestHeader(b,a)});y.onload=function(){var a=y.statusText||"",b="response"in y?y.response:y.responseText,c=1223===y.status?204:y.status;0===c&&(c=b?200:"file"===ga(k).protocol?404:0);v(l,c,b,y.getAllResponseHeaders(),a,"complete")}; 10264y.onerror=function(){v(l,-1,null,null,"","error")};y.ontimeout=function(){v(l,-1,null,null,"","timeout")};y.onabort=function(){v(l,-1,null,null,"",J?"timeout":"abort")};r(G,function(a,b){y.addEventListener(b,a)});r(t,function(a,b){y.upload.addEventListener(b,a)});n&&(y.withCredentials=!0);if(s)try{y.responseType=s}catch(I){if("json"!==s)throw I;}y.send(A(h)?null:h)}if(0<p)var P=d(function(){N("timeout")},p);else p&&B(p.then)&&p.then(function(){N(w(p.$$timeoutId)?"timeout":"abort")})}}function Pf(){var a= 10265"{{",b="}}";this.startSymbol=function(b){return b?(a=b,this):a};this.endSymbol=function(a){return a?(b=a,this):b};this.$get=["$parse","$exceptionHandler","$sce",function(d,c,e){function f(a){return"\\\\\\"+a}function g(c){return c.replace(p,a).replace(n,b)}function k(a,b,c,d){var e=a.$watch(function(a){e();return d(a)},b,c);return e}function h(f,h,n,p){function v(a){try{return a=n&&!r?e.getTrusted(n,a):e.valueOf(a),p&&!w(a)?a:jc(a)}catch(b){c(Ma.interr(f,b))}}var r=n===e.URL||n===e.MEDIA_URL;if(!f.length|| 10266-1===f.indexOf(a)){if(h)return;h=g(f);r&&(h=e.getTrusted(n,h));h=ia(h);h.exp=f;h.expressions=[];h.$$watchDelegate=k;return h}p=!!p;for(var q,y,J=0,I=[],P,Q=f.length,M=[],L=[],u;J<Q;)if(-1!==(q=f.indexOf(a,J))&&-1!==(y=f.indexOf(b,q+l)))J!==q&&M.push(g(f.substring(J,q))),J=f.substring(q+l,y),I.push(J),J=y+m,L.push(M.length),M.push("");else{J!==Q&&M.push(g(f.substring(J)));break}u=1===M.length&&1===L.length;var R=r&&u?void 0:v;P=I.map(function(a){return d(a,R)});if(!h||I.length){var x=function(a){for(var b= 102670,c=I.length;b<c;b++){if(p&&A(a[b]))return;M[L[b]]=a[b]}if(r)return e.getTrusted(n,u?M[0]:M.join(""));n&&1<M.length&&Ma.throwNoconcat(f);return M.join("")};return S(function(a){var b=0,d=I.length,e=Array(d);try{for(;b<d;b++)e[b]=P[b](a);return x(e)}catch(g){c(Ma.interr(f,g))}},{exp:f,expressions:I,$$watchDelegate:function(a,b){var c;return a.$watchGroup(P,function(d,e){var f=x(d);b.call(this,f,d!==e?c:f,a);c=f})}})}}var l=a.length,m=b.length,p=new RegExp(a.replace(/./g,f),"g"),n=new RegExp(b.replace(/./g, 10268f),"g");h.startSymbol=function(){return a};h.endSymbol=function(){return b};return h}]}function Qf(){this.$get=["$$intervalFactory","$window",function(a,b){var d={},c=function(a){b.clearInterval(a);delete d[a]},e=a(function(a,c,e){a=b.setInterval(a,c);d[a]=e;return a},c);e.cancel=function(a){if(!a)return!1;if(!a.hasOwnProperty("$$intervalId"))throw Qg("badprom");if(!d.hasOwnProperty(a.$$intervalId))return!1;a=a.$$intervalId;var b=d[a],e=b.promise;e.$$state&&(e.$$state.pur=!0);b.reject("canceled"); 10269c(a);return!0};return e}]}function Rf(){this.$get=["$browser","$q","$$q","$rootScope",function(a,b,d,c){return function(e,f){return function(g,k,h,l){function m(){p?g.apply(null,n):g(s)}var p=4<arguments.length,n=p?Ha.call(arguments,4):[],s=0,G=w(l)&&!l,t=(G?d:b).defer(),r=t.promise;h=w(h)?h:0;r.$$intervalId=e(function(){G?a.defer(m):c.$evalAsync(m);t.notify(s++);0<h&&s>=h&&(t.resolve(s),f(r.$$intervalId));G||c.$apply()},k,t,G);return r}}}]}function Cd(a,b){var d=ga(a);b.$$protocol=d.protocol;b.$$host= 10270d.hostname;b.$$port=fa(d.port)||Rg[d.protocol]||null}function Dd(a,b,d){if(Sg.test(a))throw kb("badpath",a);var c="/"!==a.charAt(0);c&&(a="/"+a);a=ga(a);for(var c=(c&&"/"===a.pathname.charAt(0)?a.pathname.substring(1):a.pathname).split("/"),e=c.length;e--;)c[e]=decodeURIComponent(c[e]),d&&(c[e]=c[e].replace(/\//g,"%2F"));d=c.join("/");b.$$path=d;b.$$search=hc(a.search);b.$$hash=decodeURIComponent(a.hash);b.$$path&&"/"!==b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function yc(a,b){return a.slice(0, 10271b.length)===b}function ya(a,b){if(yc(b,a))return b.substr(a.length)}function Da(a){var b=a.indexOf("#");return-1===b?a:a.substr(0,b)}function zc(a,b,d){this.$$html5=!0;d=d||"";Cd(a,this);this.$$parse=function(a){var d=ya(b,a);if(!C(d))throw kb("ipthprfx",a,b);Dd(d,this,!0);this.$$path||(this.$$path="/");this.$$compose()};this.$$normalizeUrl=function(a){return b+a.substr(1)};this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;w(f=ya(a,c))?(g=f,g=d&&w(f=ya(d,f))? 10272b+(ya("/",f)||f):a+g):w(f=ya(b,c))?g=b+f:b===c+"/"&&(g=b);g&&this.$$parse(g);return!!g}}function Ac(a,b,d){Cd(a,this);this.$$parse=function(c){var e=ya(a,c)||ya(b,c),f;A(e)||"#"!==e.charAt(0)?this.$$html5?f=e:(f="",A(e)&&(a=c,this.replace())):(f=ya(d,e),A(f)&&(f=e));Dd(f,this,!1);c=this.$$path;var e=a,g=/^\/[A-Z]:(\/.*)/;yc(f,e)&&(f=f.replace(e,""));g.exec(f)||(c=(f=g.exec(c))?f[1]:c);this.$$path=c;this.$$compose()};this.$$normalizeUrl=function(b){return a+(b?d+b:"")};this.$$parseLinkUrl=function(b, 10273d){return Da(a)===Da(b)?(this.$$parse(b),!0):!1}}function Ed(a,b,d){this.$$html5=!0;Ac.apply(this,arguments);this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;a===Da(c)?f=c:(g=ya(b,c))?f=a+d+g:b===c+"/"&&(f=b);f&&this.$$parse(f);return!!f};this.$$normalizeUrl=function(b){return a+d+b}}function Mb(a){return function(){return this[a]}}function Fd(a,b){return function(d){if(A(d))return this[a];this[a]=b(d);this.$$compose();return this}}function Yf(){var a="!", 10274b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return w(b)?(a=b,this):a};this.html5Mode=function(a){if(Ga(a))return b.enabled=a,this;if(D(a)){Ga(a.enabled)&&(b.enabled=a.enabled);Ga(a.requireBase)&&(b.requireBase=a.requireBase);if(Ga(a.rewriteLinks)||C(a.rewriteLinks))b.rewriteLinks=a.rewriteLinks;return this}return b};this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(d,c,e,f,g){function k(a,b){return a===b||ga(a).href===ga(b).href}function h(a, 10275b,d){var e=m.url(),f=m.$$state;try{c.url(a,b,d),m.$$state=c.state()}catch(g){throw m.url(e),m.$$state=f,g;}}function l(a,b){d.$broadcast("$locationChangeSuccess",m.absUrl(),a,m.$$state,b)}var m,p;p=c.baseHref();var n=c.url(),s;if(b.enabled){if(!p&&b.requireBase)throw kb("nobase");s=n.substring(0,n.indexOf("/",n.indexOf("//")+2))+(p||"/");p=e.history?zc:Ed}else s=Da(n),p=Ac;var r=s.substr(0,Da(s).lastIndexOf("/")+1);m=new p(s,r,"#"+a);m.$$parseLinkUrl(n,n);m.$$state=c.state();var t=/^\s*(javascript|mailto):/i; 10276f.on("click",function(a){var e=b.rewriteLinks;if(e&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!==a.which&&2!==a.button){for(var g=x(a.target);"a"!==ua(g[0]);)if(g[0]===f[0]||!(g=g.parent())[0])return;if(!C(e)||!A(g.attr(e))){var e=g.prop("href"),h=g.attr("href")||g.attr("xlink:href");D(e)&&"[object SVGAnimatedString]"===e.toString()&&(e=ga(e.animVal).href);t.test(e)||!e||g.attr("target")||a.isDefaultPrevented()||!m.$$parseLinkUrl(e,h)||(a.preventDefault(),m.absUrl()!==c.url()&&d.$apply())}}});m.absUrl()!== 10277n&&c.url(m.absUrl(),!0);var N=!0;c.onUrlChange(function(a,b){yc(a,r)?(d.$evalAsync(function(){var c=m.absUrl(),e=m.$$state,f;m.$$parse(a);m.$$state=b;f=d.$broadcast("$locationChangeStart",a,c,b,e).defaultPrevented;m.absUrl()===a&&(f?(m.$$parse(c),m.$$state=e,h(c,!1,e)):(N=!1,l(c,e)))}),d.$$phase||d.$digest()):g.location.href=a});d.$watch(function(){if(N||m.$$urlUpdatedByLocation){m.$$urlUpdatedByLocation=!1;var a=c.url(),b=m.absUrl(),f=c.state(),g=m.$$replace,n=!k(a,b)||m.$$html5&&e.history&&f!== 10278m.$$state;if(N||n)N=!1,d.$evalAsync(function(){var b=m.absUrl(),c=d.$broadcast("$locationChangeStart",b,a,m.$$state,f).defaultPrevented;m.absUrl()===b&&(c?(m.$$parse(a),m.$$state=f):(n&&h(b,g,f===m.$$state?null:m.$$state),l(a,f)))})}m.$$replace=!1});return m}]}function Zf(){var a=!0,b=this;this.debugEnabled=function(b){return w(b)?(a=b,this):a};this.$get=["$window",function(d){function c(a){dc(a)&&(a.stack&&f?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&& 10279(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=d.console||{},e=b[a]||b.log||E;return function(){var a=[];r(arguments,function(b){a.push(c(b))});return Function.prototype.apply.call(e,b,a)}}var f=wa||/\bEdge\//.test(d.navigator&&d.navigator.userAgent);return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){a&&c.apply(b,arguments)}}()}}]}function Tg(a){return a+""}function Ug(a,b){return"undefined"!==typeof a?a: 10280b}function Gd(a,b){return"undefined"===typeof a?b:"undefined"===typeof b?a:a+b}function Vg(a,b){switch(a.type){case q.MemberExpression:if(a.computed)return!1;break;case q.UnaryExpression:return 1;case q.BinaryExpression:return"+"!==a.operator?1:!1;case q.CallExpression:return!1}return void 0===b?Hd:b}function Z(a,b,d){var c,e,f=a.isPure=Vg(a,d);switch(a.type){case q.Program:c=!0;r(a.body,function(a){Z(a.expression,b,f);c=c&&a.expression.constant});a.constant=c;break;case q.Literal:a.constant=!0;a.toWatch= 10281[];break;case q.UnaryExpression:Z(a.argument,b,f);a.constant=a.argument.constant;a.toWatch=a.argument.toWatch;break;case q.BinaryExpression:Z(a.left,b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case q.LogicalExpression:Z(a.left,b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.constant?[]:[a];break;case q.ConditionalExpression:Z(a.test,b,f);Z(a.alternate,b,f);Z(a.consequent,b,f);a.constant=a.test.constant&& 10282a.alternate.constant&&a.consequent.constant;a.toWatch=a.constant?[]:[a];break;case q.Identifier:a.constant=!1;a.toWatch=[a];break;case q.MemberExpression:Z(a.object,b,f);a.computed&&Z(a.property,b,f);a.constant=a.object.constant&&(!a.computed||a.property.constant);a.toWatch=a.constant?[]:[a];break;case q.CallExpression:c=d=a.filter?!b(a.callee.name).$stateful:!1;e=[];r(a.arguments,function(a){Z(a,b,f);c=c&&a.constant;e.push.apply(e,a.toWatch)});a.constant=c;a.toWatch=d?e:[a];break;case q.AssignmentExpression:Z(a.left, 10283b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=[a];break;case q.ArrayExpression:c=!0;e=[];r(a.elements,function(a){Z(a,b,f);c=c&&a.constant;e.push.apply(e,a.toWatch)});a.constant=c;a.toWatch=e;break;case q.ObjectExpression:c=!0;e=[];r(a.properties,function(a){Z(a.value,b,f);c=c&&a.value.constant;e.push.apply(e,a.value.toWatch);a.computed&&(Z(a.key,b,!1),c=c&&a.key.constant,e.push.apply(e,a.key.toWatch))});a.constant=c;a.toWatch=e;break;case q.ThisExpression:a.constant= 10284!1;a.toWatch=[];break;case q.LocalsExpression:a.constant=!1,a.toWatch=[]}}function Id(a){if(1===a.length){a=a[0].expression;var b=a.toWatch;return 1!==b.length?b:b[0]!==a?b:void 0}}function Jd(a){return a.type===q.Identifier||a.type===q.MemberExpression}function Kd(a){if(1===a.body.length&&Jd(a.body[0].expression))return{type:q.AssignmentExpression,left:a.body[0].expression,right:{type:q.NGValueParameter},operator:"="}}function Ld(a){this.$filter=a}function Md(a){this.$filter=a}function Nb(a,b,d){this.ast= 10285new q(a,d);this.astCompiler=d.csp?new Md(b):new Ld(b)}function Bc(a){return B(a.valueOf)?a.valueOf():Wg.call(a)}function $f(){var a=T(),b={"true":!0,"false":!1,"null":null,undefined:void 0},d,c;this.addLiteral=function(a,c){b[a]=c};this.setIdentifierFns=function(a,b){d=a;c=b;return this};this.$get=["$filter",function(e){function f(b,c){var d,f;switch(typeof b){case "string":return f=b=b.trim(),d=a[f],d||(d=new Ob(G),d=(new Nb(d,e,G)).parse(b),a[f]=p(d)),s(d,c);case "function":return s(b,c);default:return s(E, 10286c)}}function g(a,b,c){return null==a||null==b?a===b:"object"!==typeof a||(a=Bc(a),"object"!==typeof a||c)?a===b||a!==a&&b!==b:!1}function k(a,b,c,d,e){var f=d.inputs,h;if(1===f.length){var k=g,f=f[0];return a.$watch(function(a){var b=f(a);g(b,k,f.isPure)||(h=d(a,void 0,void 0,[b]),k=b&&Bc(b));return h},b,c,e)}for(var l=[],m=[],n=0,p=f.length;n<p;n++)l[n]=g,m[n]=null;return a.$watch(function(a){for(var b=!1,c=0,e=f.length;c<e;c++){var k=f[c](a);if(b||(b=!g(k,l[c],f[c].isPure)))m[c]=k,l[c]=k&&Bc(k)}b&& 10287(h=d(a,void 0,void 0,m));return h},b,c,e)}function h(a,b,c,d,e){function f(){h(m)&&k()}function g(a,b,c,d){m=u&&d?d[0]:n(a,b,c,d);h(m)&&a.$$postDigest(f);return s(m)}var h=d.literal?l:w,k,m,n=d.$$intercepted||d,s=d.$$interceptor||Ta,u=d.inputs&&!n.inputs;g.literal=d.literal;g.constant=d.constant;g.inputs=d.inputs;p(g);return k=a.$watch(g,b,c,e)}function l(a){var b=!0;r(a,function(a){w(a)||(b=!1)});return b}function m(a,b,c,d){var e=a.$watch(function(a){e();return d(a)},b,c);return e}function p(a){a.constant? 10288a.$$watchDelegate=m:a.oneTime?a.$$watchDelegate=h:a.inputs&&(a.$$watchDelegate=k);return a}function n(a,b){function c(d){return b(a(d))}c.$stateful=a.$stateful||b.$stateful;c.$$pure=a.$$pure&&b.$$pure;return c}function s(a,b){if(!b)return a;a.$$interceptor&&(b=n(a.$$interceptor,b),a=a.$$intercepted);var c=!1,d=function(d,e,f,g){d=c&&g?g[0]:a(d,e,f,g);return b(d)};d.$$intercepted=a;d.$$interceptor=b;d.literal=a.literal;d.oneTime=a.oneTime;d.constant=a.constant;b.$stateful||(c=!a.inputs,d.inputs=a.inputs? 10289a.inputs:[a],b.$$pure||(d.inputs=d.inputs.map(function(a){return a.isPure===Hd?function(b){return a(b)}:a})));return p(d)}var G={csp:Ba().noUnsafeEval,literals:Ia(b),isIdentifierStart:B(d)&&d,isIdentifierContinue:B(c)&&c};f.$$getAst=function(a){var b=new Ob(G);return(new Nb(b,e,G)).getAst(a).ast};return f}]}function bg(){var a=!0;this.$get=["$rootScope","$exceptionHandler",function(b,d){return Nd(function(a){b.$evalAsync(a)},d,a)}];this.errorOnUnhandledRejections=function(b){return w(b)?(a=b,this): 10290a}}function cg(){var a=!0;this.$get=["$browser","$exceptionHandler",function(b,d){return Nd(function(a){b.defer(a)},d,a)}];this.errorOnUnhandledRejections=function(b){return w(b)?(a=b,this):a}}function Nd(a,b,d){function c(){return new e}function e(){var a=this.promise=new f;this.resolve=function(b){h(a,b)};this.reject=function(b){m(a,b)};this.notify=function(b){n(a,b)}}function f(){this.$$state={status:0}}function g(){for(;!w&&x.length;){var a=x.shift();if(!a.pur){a.pur=!0;var c=a.value,c="Possibly unhandled rejection: "+ 10291("function"===typeof c?c.toString().replace(/ \{[\s\S]*$/,""):A(c)?"undefined":"string"!==typeof c?Ne(c,void 0):c);dc(a.value)?b(a.value,c):b(c)}}}function k(c){!d||c.pending||2!==c.status||c.pur||(0===w&&0===x.length&&a(g),x.push(c));!c.processScheduled&&c.pending&&(c.processScheduled=!0,++w,a(function(){var e,f,k;k=c.pending;c.processScheduled=!1;c.pending=void 0;try{for(var l=0,n=k.length;l<n;++l){c.pur=!0;f=k[l][0];e=k[l][c.status];try{B(e)?h(f,e(c.value)):1===c.status?h(f,c.value):m(f,c.value)}catch(p){m(f, 10292p),p&&!0===p.$$passToExceptionHandler&&b(p)}}}finally{--w,d&&0===w&&a(g)}}))}function h(a,b){a.$$state.status||(b===a?p(a,v("qcycle",b)):l(a,b))}function l(a,b){function c(b){g||(g=!0,l(a,b))}function d(b){g||(g=!0,p(a,b))}function e(b){n(a,b)}var f,g=!1;try{if(D(b)||B(b))f=b.then;B(f)?(a.$$state.status=-1,f.call(b,c,d,e)):(a.$$state.value=b,a.$$state.status=1,k(a.$$state))}catch(h){d(h)}}function m(a,b){a.$$state.status||p(a,b)}function p(a,b){a.$$state.value=b;a.$$state.status=2;k(a.$$state)}function n(c, 10293d){var e=c.$$state.pending;0>=c.$$state.status&&e&&e.length&&a(function(){for(var a,c,f=0,g=e.length;f<g;f++){c=e[f][0];a=e[f][3];try{n(c,B(a)?a(d):d)}catch(h){b(h)}}})}function s(a){var b=new f;m(b,a);return b}function G(a,b,c){var d=null;try{B(c)&&(d=c())}catch(e){return s(e)}return d&&B(d.then)?d.then(function(){return b(a)},s):b(a)}function t(a,b,c,d){var e=new f;h(e,a);return e.then(b,c,d)}function q(a){if(!B(a))throw v("norslvr",a);var b=new f;a(function(a){h(b,a)},function(a){m(b,a)});return b} 10294var v=F("$q",TypeError),w=0,x=[];S(f.prototype,{then:function(a,b,c){if(A(a)&&A(b)&&A(c))return this;var d=new f;this.$$state.pending=this.$$state.pending||[];this.$$state.pending.push([d,a,b,c]);0<this.$$state.status&&k(this.$$state);return d},"catch":function(a){return this.then(null,a)},"finally":function(a,b){return this.then(function(b){return G(b,y,a)},function(b){return G(b,s,a)},b)}});var y=t;q.prototype=f.prototype;q.defer=c;q.reject=s;q.when=t;q.resolve=y;q.all=function(a){var b=new f,c= 102950,d=H(a)?[]:{};r(a,function(a,e){c++;t(a).then(function(a){d[e]=a;--c||h(b,d)},function(a){m(b,a)})});0===c&&h(b,d);return b};q.race=function(a){var b=c();r(a,function(a){t(a).then(b.resolve,b.reject)});return b.promise};return q}function mg(){this.$get=["$window","$timeout",function(a,b){var d=a.requestAnimationFrame||a.webkitRequestAnimationFrame,c=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||a.webkitCancelRequestAnimationFrame,e=!!d,f=e?function(a){var b=d(a);return function(){c(b)}}: 10296function(a){var c=b(a,16.66,!1);return function(){b.cancel(c)}};f.supported=e;return f}]}function ag(){function a(a){function b(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$id=++qb;this.$$ChildScope=null;this.$$suspended=!1}b.prototype=a;return b}var b=10,d=F("$rootScope"),c=null,e=null;this.digestTtl=function(a){arguments.length&&(b=a);return b};this.$get=["$exceptionHandler","$parse","$browser", 10297function(f,g,k){function h(a){a.currentScope.$$destroyed=!0}function l(a){9===wa&&(a.$$childHead&&l(a.$$childHead),a.$$nextSibling&&l(a.$$nextSibling));a.$parent=a.$$nextSibling=a.$$prevSibling=a.$$childHead=a.$$childTail=a.$root=a.$$watchers=null}function m(){this.$id=++qb;this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this.$root=this;this.$$suspended=this.$$destroyed=!1;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount= 102980;this.$$isolateBindings=null}function p(a){if(v.$$phase)throw d("inprog",v.$$phase);v.$$phase=a}function n(a,b){do a.$$watchersCount+=b;while(a=a.$parent)}function s(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function G(){}function t(){for(;y.length;)try{y.shift()()}catch(a){f(a)}e=null}function q(){null===e&&(e=k.defer(function(){v.$apply(t)},null,"$applyAsync"))}m.prototype={constructor:m,$new:function(b,c){var d;c=c||this;b?(d=new m, 10299d.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=a(this)),d=new this.$$ChildScope);d.$parent=c;d.$$prevSibling=c.$$childTail;c.$$childHead?(c.$$childTail.$$nextSibling=d,c.$$childTail=d):c.$$childHead=c.$$childTail=d;(b||c!==this)&&d.$on("$destroy",h);return d},$watch:function(a,b,d,e){var f=g(a);b=B(b)?b:E;if(f.$$watchDelegate)return f.$$watchDelegate(this,b,d,f,a);var h=this,k=h.$$watchers,l={fn:b,last:G,get:f,exp:e||a,eq:!!d};c=null;k||(k=h.$$watchers=[],k.$$digestWatchIndex=-1);k.unshift(l); 10300k.$$digestWatchIndex++;n(this,1);return function(){var a=cb(k,l);0<=a&&(n(h,-1),a<k.$$digestWatchIndex&&k.$$digestWatchIndex--);c=null}},$watchGroup:function(a,b){function c(){h=!1;try{k?(k=!1,b(e,e,g)):b(e,d,g)}finally{for(var f=0;f<a.length;f++)d[f]=e[f]}}var d=Array(a.length),e=Array(a.length),f=[],g=this,h=!1,k=!0;if(!a.length){var l=!0;g.$evalAsync(function(){l&&b(e,e,g)});return function(){l=!1}}if(1===a.length)return this.$watch(a[0],function(a,c,f){e[0]=a;d[0]=c;b(e,a===c?e:d,f)});r(a,function(a, 10301b){var d=g.$watch(a,function(a){e[b]=a;h||(h=!0,g.$evalAsync(c))});f.push(d)});return function(){for(;f.length;)f.shift()()}},$watchCollection:function(a,b){function c(a){e=a;var b,d,g,h;if(!A(e)){if(D(e))if(za(e))for(f!==n&&(f=n,t=f.length=0,l++),a=e.length,t!==a&&(l++,f.length=t=a),b=0;b<a;b++)h=f[b],g=e[b],d=h!==h&&g!==g,d||h===g||(l++,f[b]=g);else{f!==p&&(f=p={},t=0,l++);a=0;for(b in e)ta.call(e,b)&&(a++,g=e[b],h=f[b],b in f?(d=h!==h&&g!==g,d||h===g||(l++,f[b]=g)):(t++,f[b]=g,l++));if(t>a)for(b in l++, 10302f)ta.call(e,b)||(t--,delete f[b])}else f!==e&&(f=e,l++);return l}}c.$$pure=g(a).literal;c.$stateful=!c.$$pure;var d=this,e,f,h,k=1<b.length,l=0,m=g(a,c),n=[],p={},s=!0,t=0;return this.$watch(m,function(){s?(s=!1,b(e,e,d)):b(e,h,d);if(k)if(D(e))if(za(e)){h=Array(e.length);for(var a=0;a<e.length;a++)h[a]=e[a]}else for(a in h={},e)ta.call(e,a)&&(h[a]=e[a]);else h=e})},$digest:function(){var a,g,h,l,m,n,s,r=b,q,y=w.length?v:this,N=[],A,z;p("$digest");k.$$checkUrlChange();this===v&&null!==e&&(k.defer.cancel(e), 10303t());c=null;do{s=!1;q=y;for(n=0;n<w.length;n++){try{z=w[n],l=z.fn,l(z.scope,z.locals)}catch(C){f(C)}c=null}w.length=0;a:do{if(n=!q.$$suspended&&q.$$watchers)for(n.$$digestWatchIndex=n.length;n.$$digestWatchIndex--;)try{if(a=n[n.$$digestWatchIndex])if(m=a.get,(g=m(q))!==(h=a.last)&&!(a.eq?va(g,h):Y(g)&&Y(h)))s=!0,c=a,a.last=a.eq?Ia(g,null):g,l=a.fn,l(g,h===G?g:h,q),5>r&&(A=4-r,N[A]||(N[A]=[]),N[A].push({msg:B(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:g,oldVal:h}));else if(a===c){s= 10304!1;break a}}catch(E){f(E)}if(!(n=!q.$$suspended&&q.$$watchersCount&&q.$$childHead||q!==y&&q.$$nextSibling))for(;q!==y&&!(n=q.$$nextSibling);)q=q.$parent}while(q=n);if((s||w.length)&&!r--)throw v.$$phase=null,d("infdig",b,N);}while(s||w.length);for(v.$$phase=null;J<x.length;)try{x[J++]()}catch(D){f(D)}x.length=J=0;k.$$checkUrlChange()},$suspend:function(){this.$$suspended=!0},$isSuspended:function(){return this.$$suspended},$resume:function(){this.$$suspended=!1},$destroy:function(){if(!this.$$destroyed){var a= 10305this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;this===v&&k.$$applicationDestroyed();n(this,-this.$$watchersCount);for(var b in this.$$listenerCount)s(this,this.$$listenerCount[b],b);a&&a.$$childHead===this&&(a.$$childHead=this.$$nextSibling);a&&a.$$childTail===this&&(a.$$childTail=this.$$prevSibling);this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling);this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling);this.$destroy=this.$digest=this.$apply= 10306this.$evalAsync=this.$applyAsync=E;this.$on=this.$watch=this.$watchGroup=function(){return E};this.$$listeners={};this.$$nextSibling=null;l(this)}},$eval:function(a,b){return g(a)(this,b)},$evalAsync:function(a,b){v.$$phase||w.length||k.defer(function(){w.length&&v.$digest()},null,"$evalAsync");w.push({scope:this,fn:g(a),locals:b})},$$postDigest:function(a){x.push(a)},$apply:function(a){try{p("$apply");try{return this.$eval(a)}finally{v.$$phase=null}}catch(b){f(b)}finally{try{v.$digest()}catch(c){throw f(c), 10307c;}}},$applyAsync:function(a){function b(){c.$eval(a)}var c=this;a&&y.push(b);a=g(a);q()},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){var d=c.indexOf(b);-1!==d&&(delete c[d],s(e,1,a))}},$emit:function(a,b){var c=[],d,e=this,g=!1,h={name:a,targetScope:e,stopPropagation:function(){g=!0},preventDefault:function(){h.defaultPrevented= 10308!0},defaultPrevented:!1},k=db([h],arguments,1),l,m;do{d=e.$$listeners[a]||c;h.currentScope=e;l=0;for(m=d.length;l<m;l++)if(d[l])try{d[l].apply(null,k)}catch(n){f(n)}else d.splice(l,1),l--,m--;if(g)break;e=e.$parent}while(e);h.currentScope=null;return h},$broadcast:function(a,b){var c=this,d=this,e={name:a,targetScope:this,preventDefault:function(){e.defaultPrevented=!0},defaultPrevented:!1};if(!this.$$listenerCount[a])return e;for(var g=db([e],arguments,1),h,k;c=d;){e.currentScope=c;d=c.$$listeners[a]|| 10309[];h=0;for(k=d.length;h<k;h++)if(d[h])try{d[h].apply(null,g)}catch(l){f(l)}else d.splice(h,1),h--,k--;if(!(d=c.$$listenerCount[a]&&c.$$childHead||c!==this&&c.$$nextSibling))for(;c!==this&&!(d=c.$$nextSibling);)c=c.$parent}e.currentScope=null;return e}};var v=new m,w=v.$$asyncQueue=[],x=v.$$postDigestQueue=[],y=v.$$applyAsyncQueue=[],J=0;return v}]}function Qe(){var a=/^\s*(https?|s?ftp|mailto|tel|file):/,b=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationTrustedUrlList=function(b){return w(b)? 10310(a=b,this):a};this.imgSrcSanitizationTrustedUrlList=function(a){return w(a)?(b=a,this):b};this.$get=function(){return function(d,c){var e=c?b:a,f=ga(d&&d.trim()).href;return""===f||f.match(e)?d:"unsafe:"+f}}}function Xg(a){if("self"===a)return a;if(C(a)){if(-1<a.indexOf("***"))throw Ea("iwcard",a);a=Od(a).replace(/\\\*\\\*/g,".*").replace(/\\\*/g,"[^:/.?&;]*");return new RegExp("^"+a+"$")}if(ab(a))return new RegExp("^"+a.source+"$");throw Ea("imatcher");}function Pd(a){var b=[];w(a)&&r(a,function(a){b.push(Xg(a))}); 10311return b}function eg(){this.SCE_CONTEXTS=W;var a=["self"],b=[];this.trustedResourceUrlList=function(b){arguments.length&&(a=Pd(b));return a};Object.defineProperty(this,"resourceUrlWhitelist",{get:function(){return this.trustedResourceUrlList},set:function(a){this.trustedResourceUrlList=a}});this.bannedResourceUrlList=function(a){arguments.length&&(b=Pd(a));return b};Object.defineProperty(this,"resourceUrlBlacklist",{get:function(){return this.bannedResourceUrlList},set:function(a){this.bannedResourceUrlList= 10312a}});this.$get=["$injector","$$sanitizeUri",function(d,c){function e(a,b){var c;"self"===a?(c=Cc(b,Qd))||(z.document.baseURI?c=z.document.baseURI:(Na||(Na=z.document.createElement("a"),Na.href=".",Na=Na.cloneNode(!1)),c=Na.href),c=Cc(b,c)):c=!!a.exec(b.href);return c}function f(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};a&&(b.prototype=new a);b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()};b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()}; 10313return b}var g=function(a){throw Ea("unsafe");};d.has("$sanitize")&&(g=d.get("$sanitize"));var k=f(),h={};h[W.HTML]=f(k);h[W.CSS]=f(k);h[W.MEDIA_URL]=f(k);h[W.URL]=f(h[W.MEDIA_URL]);h[W.JS]=f(k);h[W.RESOURCE_URL]=f(h[W.URL]);return{trustAs:function(a,b){var c=h.hasOwnProperty(a)?h[a]:null;if(!c)throw Ea("icontext",a,b);if(null===b||A(b)||""===b)return b;if("string"!==typeof b)throw Ea("itype",a);return new c(b)},getTrusted:function(d,f){if(null===f||A(f)||""===f)return f;var k=h.hasOwnProperty(d)? 10314h[d]:null;if(k&&f instanceof k)return f.$$unwrapTrustedValue();B(f.$$unwrapTrustedValue)&&(f=f.$$unwrapTrustedValue());if(d===W.MEDIA_URL||d===W.URL)return c(f.toString(),d===W.MEDIA_URL);if(d===W.RESOURCE_URL){var k=ga(f.toString()),n,s,r=!1;n=0;for(s=a.length;n<s;n++)if(e(a[n],k)){r=!0;break}if(r)for(n=0,s=b.length;n<s;n++)if(e(b[n],k)){r=!1;break}if(r)return f;throw Ea("insecurl",f.toString());}if(d===W.HTML)return g(f);throw Ea("unsafe");},valueOf:function(a){return a instanceof k?a.$$unwrapTrustedValue(): 10315a}}}]}function dg(){var a=!0;this.enabled=function(b){arguments.length&&(a=!!b);return a};this.$get=["$parse","$sceDelegate",function(b,d){if(a&&8>wa)throw Ea("iequirks");var c=ja(W);c.isEnabled=function(){return a};c.trustAs=d.trustAs;c.getTrusted=d.getTrusted;c.valueOf=d.valueOf;a||(c.trustAs=c.getTrusted=function(a,b){return b},c.valueOf=Ta);c.parseAs=function(a,d){var e=b(d);return e.literal&&e.constant?e:b(d,function(b){return c.getTrusted(a,b)})};var e=c.parseAs,f=c.getTrusted,g=c.trustAs;r(W, 10316function(a,b){var d=K(b);c[("parse_as_"+d).replace(Dc,xb)]=function(b){return e(a,b)};c[("get_trusted_"+d).replace(Dc,xb)]=function(b){return f(a,b)};c[("trust_as_"+d).replace(Dc,xb)]=function(b){return g(a,b)}});return c}]}function fg(){this.$get=["$window","$document",function(a,b){var d={},c=!((!a.nw||!a.nw.process)&&a.chrome&&(a.chrome.app&&a.chrome.app.runtime||!a.chrome.app&&a.chrome.runtime&&a.chrome.runtime.id))&&a.history&&a.history.pushState,e=fa((/android (\d+)/.exec(K((a.navigator||{}).userAgent))|| 10317[])[1]),f=/Boxee/i.test((a.navigator||{}).userAgent),g=b[0]||{},k=g.body&&g.body.style,h=!1,l=!1;k&&(h=!!("transition"in k||"webkitTransition"in k),l=!!("animation"in k||"webkitAnimation"in k));return{history:!(!c||4>e||f),hasEvent:function(a){if("input"===a&&wa)return!1;if(A(d[a])){var b=g.createElement("div");d[a]="on"+a in b}return d[a]},csp:Ba(),transitions:h,animations:l,android:e}}]}function gg(){this.$get=ia(function(a){return new Yg(a)})}function Yg(a){function b(){var a=e.pop();return a&& 10318a.cb}function d(a){for(var b=e.length-1;0<=b;--b){var c=e[b];if(c.type===a)return e.splice(b,1),c.cb}}var c={},e=[],f=this.ALL_TASKS_TYPE="$$all$$",g=this.DEFAULT_TASK_TYPE="$$default$$";this.completeTask=function(e,h){h=h||g;try{e()}finally{var l;l=h||g;c[l]&&(c[l]--,c[f]--);l=c[h];var m=c[f];if(!m||!l)for(l=m?d:b;m=l(h);)try{m()}catch(p){a.error(p)}}};this.incTaskCount=function(a){a=a||g;c[a]=(c[a]||0)+1;c[f]=(c[f]||0)+1};this.notifyWhenNoPendingTasks=function(a,b){b=b||f;c[b]?e.push({type:b,cb:a}): 10319a()}}function ig(){var a;this.httpOptions=function(b){return b?(a=b,this):a};this.$get=["$exceptionHandler","$templateCache","$http","$q","$sce",function(b,d,c,e,f){function g(k,h){g.totalPendingRequests++;if(!C(k)||A(d.get(k)))k=f.getTrustedResourceUrl(k);var l=c.defaults&&c.defaults.transformResponse;H(l)?l=l.filter(function(a){return a!==wc}):l===wc&&(l=null);return c.get(k,S({cache:d,transformResponse:l},a)).finally(function(){g.totalPendingRequests--}).then(function(a){return d.put(k,a.data)}, 10320function(a){h||(a=Zg("tpload",k,a.status,a.statusText),b(a));return e.reject(a)})}g.totalPendingRequests=0;return g}]}function jg(){this.$get=["$rootScope","$browser","$location",function(a,b,d){return{findBindings:function(a,b,d){a=a.getElementsByClassName("ng-binding");var g=[];r(a,function(a){var c=ca.element(a).data("$binding");c&&r(c,function(c){d?(new RegExp("(^|\\s)"+Od(b)+"(\\s|\\||$)")).test(c)&&g.push(a):-1!==c.indexOf(b)&&g.push(a)})});return g},findModels:function(a,b,d){for(var g=["ng-", 10321"data-ng-","ng\\:"],k=0;k<g.length;++k){var h=a.querySelectorAll("["+g[k]+"model"+(d?"=":"*=")+'"'+b+'"]');if(h.length)return h}},getLocation:function(){return d.url()},setLocation:function(b){b!==d.url()&&(d.url(b),a.$digest())},whenStable:function(a){b.notifyWhenNoOutstandingRequests(a)}}}]}function kg(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(a,b,d,c,e){function f(f,h,l){B(f)||(l=h,h=f,f=E);var m=Ha.call(arguments,3),p=w(l)&&!l,n=(p?c:d).defer(),s=n.promise,r; 10322r=b.defer(function(){try{n.resolve(f.apply(null,m))}catch(b){n.reject(b),e(b)}finally{delete g[s.$$timeoutId]}p||a.$apply()},h,"$timeout");s.$$timeoutId=r;g[r]=n;return s}var g={};f.cancel=function(a){if(!a)return!1;if(!a.hasOwnProperty("$$timeoutId"))throw $g("badprom");if(!g.hasOwnProperty(a.$$timeoutId))return!1;a=a.$$timeoutId;var c=g[a],d=c.promise;d.$$state&&(d.$$state.pur=!0);c.reject("canceled");delete g[a];return b.defer.cancel(a)};return f}]}function ga(a){if(!C(a))return a;wa&&(aa.setAttribute("href", 10323a),a=aa.href);aa.setAttribute("href",a);a=aa.hostname;!ah&&-1<a.indexOf(":")&&(a="["+a+"]");return{href:aa.href,protocol:aa.protocol?aa.protocol.replace(/:$/,""):"",host:aa.host,search:aa.search?aa.search.replace(/^\?/,""):"",hash:aa.hash?aa.hash.replace(/^#/,""):"",hostname:a,port:aa.port,pathname:"/"===aa.pathname.charAt(0)?aa.pathname:"/"+aa.pathname}}function Og(a){var b=[Qd].concat(a.map(ga));return function(a){a=ga(a);return b.some(Cc.bind(null,a))}}function Cc(a,b){a=ga(a);b=ga(b);return a.protocol=== 10324b.protocol&&a.host===b.host}function lg(){this.$get=ia(z)}function Rd(a){function b(a){try{return decodeURIComponent(a)}catch(b){return a}}var d=a[0]||{},c={},e="";return function(){var a,g,k,h,l;try{a=d.cookie||""}catch(m){a=""}if(a!==e)for(e=a,a=e.split("; "),c={},k=0;k<a.length;k++)g=a[k],h=g.indexOf("="),0<h&&(l=b(g.substring(0,h)),A(c[l])&&(c[l]=b(g.substring(h+1))));return c}}function pg(){this.$get=Rd}function fd(a){function b(d,c){if(D(d)){var e={};r(d,function(a,c){e[c]=b(c,a)});return e}return a.factory(d+ 10325"Filter",c)}this.register=b;this.$get=["$injector",function(a){return function(b){return a.get(b+"Filter")}}];b("currency",Sd);b("date",Td);b("filter",bh);b("json",ch);b("limitTo",dh);b("lowercase",eh);b("number",Ud);b("orderBy",Vd);b("uppercase",fh)}function bh(){return function(a,b,d,c){if(!za(a)){if(null==a)return a;throw F("filter")("notarray",a);}c=c||"$";var e;switch(Ec(b)){case "function":break;case "boolean":case "null":case "number":case "string":e=!0;case "object":b=gh(b,d,c,e);break;default:return a}return Array.prototype.filter.call(a, 10326b)}}function gh(a,b,d,c){var e=D(a)&&d in a;!0===b?b=va:B(b)||(b=function(a,b){if(A(a))return!1;if(null===a||null===b)return a===b;if(D(b)||D(a)&&!cc(a))return!1;a=K(""+a);b=K(""+b);return-1!==a.indexOf(b)});return function(f){return e&&!D(f)?Fa(f,a[d],b,d,!1):Fa(f,a,b,d,c)}}function Fa(a,b,d,c,e,f){var g=Ec(a),k=Ec(b);if("string"===k&&"!"===b.charAt(0))return!Fa(a,b.substring(1),d,c,e);if(H(a))return a.some(function(a){return Fa(a,b,d,c,e)});switch(g){case "object":var h;if(e){for(h in a)if(h.charAt&& 10327"$"!==h.charAt(0)&&Fa(a[h],b,d,c,!0))return!0;return f?!1:Fa(a,b,d,c,!1)}if("object"===k){for(h in b)if(f=b[h],!B(f)&&!A(f)&&(g=h===c,!Fa(g?a:a[h],f,d,c,g,g)))return!1;return!0}return d(a,b);case "function":return!1;default:return d(a,b)}}function Ec(a){return null===a?"null":typeof a}function Sd(a){var b=a.NUMBER_FORMATS;return function(a,c,e){A(c)&&(c=b.CURRENCY_SYM);A(e)&&(e=b.PATTERNS[1].maxFrac);var f=c?/\u00A4/g:/\s*\u00A4\s*/g;return null==a?a:Wd(a,b.PATTERNS[1],b.GROUP_SEP,b.DECIMAL_SEP,e).replace(f, 10328c)}}function Ud(a){var b=a.NUMBER_FORMATS;return function(a,c){return null==a?a:Wd(a,b.PATTERNS[0],b.GROUP_SEP,b.DECIMAL_SEP,c)}}function hh(a){var b=0,d,c,e,f,g;-1<(c=a.indexOf(Xd))&&(a=a.replace(Xd,""));0<(e=a.search(/e/i))?(0>c&&(c=e),c+=+a.slice(e+1),a=a.substring(0,e)):0>c&&(c=a.length);for(e=0;a.charAt(e)===Fc;e++);if(e===(g=a.length))d=[0],c=1;else{for(g--;a.charAt(g)===Fc;)g--;c-=e;d=[];for(f=0;e<=g;e++,f++)d[f]=+a.charAt(e)}c>Yd&&(d=d.splice(0,Yd-1),b=c-1,c=1);return{d:d,e:b,i:c}}function ih(a, 10329b,d,c){var e=a.d,f=e.length-a.i;b=A(b)?Math.min(Math.max(d,f),c):+b;d=b+a.i;c=e[d];if(0<d){e.splice(Math.max(a.i,d));for(var g=d;g<e.length;g++)e[g]=0}else for(f=Math.max(0,f),a.i=1,e.length=Math.max(1,d=b+1),e[0]=0,g=1;g<d;g++)e[g]=0;if(5<=c)if(0>d-1){for(c=0;c>d;c--)e.unshift(0),a.i++;e.unshift(1);a.i++}else e[d-1]++;for(;f<Math.max(0,b);f++)e.push(0);if(b=e.reduceRight(function(a,b,c,d){b+=a;d[c]=b%10;return Math.floor(b/10)},0))e.unshift(b),a.i++}function Wd(a,b,d,c,e){if(!C(a)&&!X(a)||isNaN(a))return""; 10330var f=!isFinite(a),g=!1,k=Math.abs(a)+"",h="";if(f)h="\u221e";else{g=hh(k);ih(g,e,b.minFrac,b.maxFrac);h=g.d;k=g.i;e=g.e;f=[];for(g=h.reduce(function(a,b){return a&&!b},!0);0>k;)h.unshift(0),k++;0<k?f=h.splice(k,h.length):(f=h,h=[0]);k=[];for(h.length>=b.lgSize&&k.unshift(h.splice(-b.lgSize,h.length).join(""));h.length>b.gSize;)k.unshift(h.splice(-b.gSize,h.length).join(""));h.length&&k.unshift(h.join(""));h=k.join(d);f.length&&(h+=c+f.join(""));e&&(h+="e+"+e)}return 0>a&&!g?b.negPre+h+b.negSuf:b.posPre+ 10331h+b.posSuf}function Pb(a,b,d,c){var e="";if(0>a||c&&0>=a)c?a=-a+1:(a=-a,e="-");for(a=""+a;a.length<b;)a=Fc+a;d&&(a=a.substr(a.length-b));return e+a}function ea(a,b,d,c,e){d=d||0;return function(f){f=f["get"+a]();if(0<d||f>-d)f+=d;0===f&&-12===d&&(f=12);return Pb(f,b,c,e)}}function lb(a,b,d){return function(c,e){var f=c["get"+a](),g=vb((d?"STANDALONE":"")+(b?"SHORT":"")+a);return e[g][f]}}function Zd(a){var b=(new Date(a,0,1)).getDay();return new Date(a,0,(4>=b?5:12)-b)}function $d(a){return function(b){var d= 10332Zd(b.getFullYear());b=+new Date(b.getFullYear(),b.getMonth(),b.getDate()+(4-b.getDay()))-+d;b=1+Math.round(b/6048E5);return Pb(b,a)}}function Gc(a,b){return 0>=a.getFullYear()?b.ERAS[0]:b.ERAS[1]}function Td(a){function b(a){var b;if(b=a.match(d)){a=new Date(0);var f=0,g=0,k=b[8]?a.setUTCFullYear:a.setFullYear,h=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=fa(b[9]+b[10]),g=fa(b[9]+b[11]));k.call(a,fa(b[1]),fa(b[2])-1,fa(b[3]));f=fa(b[4]||0)-f;g=fa(b[5]||0)-g;k=fa(b[6]||0);b=Math.round(1E3*parseFloat("0."+ 10333(b[7]||0)));h.call(a,f,g,k,b)}return a}var d=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,d,f){var g="",k=[],h,l;d=d||"mediumDate";d=a.DATETIME_FORMATS[d]||d;C(c)&&(c=jh.test(c)?fa(c):b(c));X(c)&&(c=new Date(c));if(!ha(c)||!isFinite(c.getTime()))return c;for(;d;)(l=kh.exec(d))?(k=db(k,l,1),d=k.pop()):(k.push(d),d=null);var m=c.getTimezoneOffset();f&&(m=fc(f,m),c=gc(c,f,!0));r(k,function(b){h=lh[b];g+=h?h(c,a.DATETIME_FORMATS, 10334m):"''"===b?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function ch(){return function(a,b){A(b)&&(b=2);return eb(a,b)}}function dh(){return function(a,b,d){b=Infinity===Math.abs(Number(b))?Number(b):fa(b);if(Y(b))return a;X(a)&&(a=a.toString());if(!za(a))return a;d=!d||isNaN(d)?0:fa(d);d=0>d?Math.max(0,a.length+d):d;return 0<=b?Hc(a,d,d+b):0===d?Hc(a,b,a.length):Hc(a,Math.max(0,d+b),d)}}function Hc(a,b,d){return C(a)?a.slice(b,d):Ha.call(a,b,d)}function Vd(a){function b(b){return b.map(function(b){var c= 103351,d=Ta;if(B(b))d=b;else if(C(b)){if("+"===b.charAt(0)||"-"===b.charAt(0))c="-"===b.charAt(0)?-1:1,b=b.substring(1);if(""!==b&&(d=a(b),d.constant))var e=d(),d=function(a){return a[e]}}return{get:d,descending:c}})}function d(a){switch(typeof a){case "number":case "boolean":case "string":return!0;default:return!1}}function c(a,b){var c=0,d=a.type,h=b.type;if(d===h){var h=a.value,l=b.value;"string"===d?(h=h.toLowerCase(),l=l.toLowerCase()):"object"===d&&(D(h)&&(h=a.index),D(l)&&(l=b.index));h!==l&&(c= 10336h<l?-1:1)}else c="undefined"===d?1:"undefined"===h?-1:"null"===d?1:"null"===h?-1:d<h?-1:1;return c}return function(a,f,g,k){if(null==a)return a;if(!za(a))throw F("orderBy")("notarray",a);H(f)||(f=[f]);0===f.length&&(f=["+"]);var h=b(f),l=g?-1:1,m=B(k)?k:c;a=Array.prototype.map.call(a,function(a,b){return{value:a,tieBreaker:{value:b,type:"number",index:b},predicateValues:h.map(function(c){var e=c.get(a);c=typeof e;if(null===e)c="null";else if("object"===c)a:{if(B(e.valueOf)&&(e=e.valueOf(),d(e)))break a; 10337cc(e)&&(e=e.toString(),d(e))}return{value:e,type:c,index:b}})}});a.sort(function(a,b){for(var d=0,e=h.length;d<e;d++){var f=m(a.predicateValues[d],b.predicateValues[d]);if(f)return f*h[d].descending*l}return(m(a.tieBreaker,b.tieBreaker)||c(a.tieBreaker,b.tieBreaker))*l});return a=a.map(function(a){return a.value})}}function Ra(a){B(a)&&(a={link:a});a.restrict=a.restrict||"AC";return ia(a)}function Qb(a,b,d,c,e){this.$$controls=[];this.$error={};this.$$success={};this.$pending=void 0;this.$name=e(b.name|| 10338b.ngForm||"")(d);this.$dirty=!1;this.$valid=this.$pristine=!0;this.$submitted=this.$invalid=!1;this.$$parentForm=mb;this.$$element=a;this.$$animate=c;ae(this)}function ae(a){a.$$classCache={};a.$$classCache[be]=!(a.$$classCache[nb]=a.$$element.hasClass(nb))}function ce(a){function b(a,b,c){c&&!a.$$classCache[b]?(a.$$animate.addClass(a.$$element,b),a.$$classCache[b]=!0):!c&&a.$$classCache[b]&&(a.$$animate.removeClass(a.$$element,b),a.$$classCache[b]=!1)}function d(a,c,d){c=c?"-"+Xc(c,"-"):"";b(a,nb+ 10339c,!0===d);b(a,be+c,!1===d)}var c=a.set,e=a.unset;a.clazz.prototype.$setValidity=function(a,g,k){A(g)?(this.$pending||(this.$pending={}),c(this.$pending,a,k)):(this.$pending&&e(this.$pending,a,k),de(this.$pending)&&(this.$pending=void 0));Ga(g)?g?(e(this.$error,a,k),c(this.$$success,a,k)):(c(this.$error,a,k),e(this.$$success,a,k)):(e(this.$error,a,k),e(this.$$success,a,k));this.$pending?(b(this,"ng-pending",!0),this.$valid=this.$invalid=void 0,d(this,"",null)):(b(this,"ng-pending",!1),this.$valid= 10340de(this.$error),this.$invalid=!this.$valid,d(this,"",this.$valid));g=this.$pending&&this.$pending[a]?void 0:this.$error[a]?!1:this.$$success[a]?!0:null;d(this,a,g);this.$$parentForm.$setValidity(a,g,this)}}function de(a){if(a)for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}function Ic(a){a.$formatters.push(function(b){return a.$isEmpty(b)?b:b.toString()})}function Sa(a,b,d,c,e,f){var g=K(b[0].type);if(!e.android){var k=!1;b.on("compositionstart",function(){k=!0});b.on("compositionupdate", 10341function(a){if(A(a.data)||""===a.data)k=!1});b.on("compositionend",function(){k=!1;l()})}var h,l=function(a){h&&(f.defer.cancel(h),h=null);if(!k){var e=b.val();a=a&&a.type;"password"===g||d.ngTrim&&"false"===d.ngTrim||(e=V(e));(c.$viewValue!==e||""===e&&c.$$hasNativeValidators)&&c.$setViewValue(e,a)}};if(e.hasEvent("input"))b.on("input",l);else{var m=function(a,b,c){h||(h=f.defer(function(){h=null;b&&b.value===c||l(a)}))};b.on("keydown",function(a){var b=a.keyCode;91===b||15<b&&19>b||37<=b&&40>=b|| 10342m(a,this,this.value)});if(e.hasEvent("paste"))b.on("paste cut drop",m)}b.on("change",l);if(ee[g]&&c.$$hasNativeValidators&&g===d.type)b.on("keydown wheel mousedown",function(a){if(!h){var b=this.validity,c=b.badInput,d=b.typeMismatch;h=f.defer(function(){h=null;b.badInput===c&&b.typeMismatch===d||l(a)})}});c.$render=function(){var a=c.$isEmpty(c.$viewValue)?"":c.$viewValue;b.val()!==a&&b.val(a)}}function Rb(a,b){return function(d,c){var e,f;if(ha(d))return d;if(C(d)){'"'===d.charAt(0)&&'"'===d.charAt(d.length- 103431)&&(d=d.substring(1,d.length-1));if(mh.test(d))return new Date(d);a.lastIndex=0;if(e=a.exec(d))return e.shift(),f=c?{yyyy:c.getFullYear(),MM:c.getMonth()+1,dd:c.getDate(),HH:c.getHours(),mm:c.getMinutes(),ss:c.getSeconds(),sss:c.getMilliseconds()/1E3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},r(e,function(a,c){c<b.length&&(f[b[c]]=+a)}),e=new Date(f.yyyy,f.MM-1,f.dd,f.HH,f.mm,f.ss||0,1E3*f.sss||0),100>f.yyyy&&e.setFullYear(f.yyyy),e}return NaN}}function ob(a,b,d,c){return function(e,f,g,k,h,l,m, 10344p){function n(a){return a&&!(a.getTime&&a.getTime()!==a.getTime())}function s(a){return w(a)&&!ha(a)?r(a)||void 0:a}function r(a,b){var c=k.$options.getOption("timezone");v&&v!==c&&(b=Uc(b,fc(v)));var e=d(a,b);!isNaN(e)&&c&&(e=gc(e,c));return e}Jc(e,f,g,k,a);Sa(e,f,g,k,h,l);var t="time"===a||"datetimelocal"===a,q,v;k.$parsers.push(function(c){if(k.$isEmpty(c))return null;if(b.test(c))return r(c,q);k.$$parserName=a});k.$formatters.push(function(a){if(a&&!ha(a))throw pb("datefmt",a);if(n(a)){q=a;var b= 10345k.$options.getOption("timezone");b&&(v=b,q=gc(q,b,!0));var d=c;t&&C(k.$options.getOption("timeSecondsFormat"))&&(d=c.replace("ss.sss",k.$options.getOption("timeSecondsFormat")).replace(/:$/,""));a=m("date")(a,d,b);t&&k.$options.getOption("timeStripZeroSeconds")&&(a=a.replace(/(?::00)?(?:\.000)?$/,""));return a}v=q=null;return""});if(w(g.min)||g.ngMin){var x=g.min||p(g.ngMin)(e),z=s(x);k.$validators.min=function(a){return!n(a)||A(z)||d(a)>=z};g.$observe("min",function(a){a!==x&&(z=s(a),x=a,k.$validate())})}if(w(g.max)|| 10346g.ngMax){var y=g.max||p(g.ngMax)(e),J=s(y);k.$validators.max=function(a){return!n(a)||A(J)||d(a)<=J};g.$observe("max",function(a){a!==y&&(J=s(a),y=a,k.$validate())})}}}function Jc(a,b,d,c,e){(c.$$hasNativeValidators=D(b[0].validity))&&c.$parsers.push(function(a){var d=b.prop("validity")||{};if(d.badInput||d.typeMismatch)c.$$parserName=e;else return a})}function fe(a){a.$parsers.push(function(b){if(a.$isEmpty(b))return null;if(nh.test(b))return parseFloat(b);a.$$parserName="number"});a.$formatters.push(function(b){if(!a.$isEmpty(b)){if(!X(b))throw pb("numfmt", 10347b);b=b.toString()}return b})}function na(a){w(a)&&!X(a)&&(a=parseFloat(a));return Y(a)?void 0:a}function Kc(a){var b=a.toString(),d=b.indexOf(".");return-1===d?-1<a&&1>a&&(a=/e-(\d+)$/.exec(b))?Number(a[1]):0:b.length-d-1}function ge(a,b,d){a=Number(a);var c=(a|0)!==a,e=(b|0)!==b,f=(d|0)!==d;if(c||e||f){var g=c?Kc(a):0,k=e?Kc(b):0,h=f?Kc(d):0,g=Math.max(g,k,h),g=Math.pow(10,g);a*=g;b*=g;d*=g;c&&(a=Math.round(a));e&&(b=Math.round(b));f&&(d=Math.round(d))}return 0===(a-b)%d}function he(a,b,d,c,e){if(w(c)){a= 10348a(c);if(!a.constant)throw pb("constexpr",d,c);return a(b)}return e}function Lc(a,b){function d(a,b){if(!a||!a.length)return[];if(!b||!b.length)return a;var c=[],d=0;a:for(;d<a.length;d++){for(var e=a[d],m=0;m<b.length;m++)if(e===b[m])continue a;c.push(e)}return c}function c(a){if(!a)return a;var b=a;H(a)?b=a.map(c).join(" "):D(a)?b=Object.keys(a).filter(function(b){return a[b]}).join(" "):C(a)||(b=a+"");return b}a="ngClass"+a;var e;return["$parse",function(f){return{restrict:"AC",link:function(g, 10349k,h){function l(a,b){var c=[];r(a,function(a){if(0<b||p[a])p[a]=(p[a]||0)+b,p[a]===+(0<b)&&c.push(a)});return c.join(" ")}function m(a){if(a===b){var c=s,c=l(c&&c.split(" "),1);h.$addClass(c)}else c=s,c=l(c&&c.split(" "),-1),h.$removeClass(c);n=a}var p=k.data("$classCounts"),n=!0,s;p||(p=T(),k.data("$classCounts",p));"ngClass"!==a&&(e||(e=f("$index",function(a){return a&1})),g.$watch(e,m));g.$watch(f(h[a],c),function(a){if(n===b){var c=s&&s.split(" "),e=a&&a.split(" "),f=d(c,e),c=d(e,c),f=l(f,-1), 10350c=l(c,1);h.$addClass(c);h.$removeClass(f)}s=a})}}}]}function sd(a,b,d,c,e,f){return{restrict:"A",compile:function(g,k){var h=a(k[c]);return function(a,c){c.on(e,function(c){var e=function(){h(a,{$event:c})};if(b.$$phase)if(f)a.$evalAsync(e);else try{e()}catch(g){d(g)}else a.$apply(e)})}}}}function Sb(a,b,d,c,e,f,g,k,h){this.$modelValue=this.$viewValue=Number.NaN;this.$$rawModelValue=void 0;this.$validators={};this.$asyncValidators={};this.$parsers=[];this.$formatters=[];this.$viewChangeListeners= 10351[];this.$untouched=!0;this.$touched=!1;this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$error={};this.$$success={};this.$pending=void 0;this.$name=h(d.name||"",!1)(a);this.$$parentForm=mb;this.$options=Tb;this.$$updateEvents="";this.$$updateEventHandler=this.$$updateEventHandler.bind(this);this.$$parsedNgModel=e(d.ngModel);this.$$parsedNgModelAssign=this.$$parsedNgModel.assign;this.$$ngModelGet=this.$$parsedNgModel;this.$$ngModelSet=this.$$parsedNgModelAssign;this.$$pendingDebounce= 10352null;this.$$parserValid=void 0;this.$$parserName="parse";this.$$currentValidationRunId=0;this.$$scope=a;this.$$rootScope=a.$root;this.$$attr=d;this.$$element=c;this.$$animate=f;this.$$timeout=g;this.$$parse=e;this.$$q=k;this.$$exceptionHandler=b;ae(this);oh(this)}function oh(a){a.$$scope.$watch(function(b){b=a.$$ngModelGet(b);b===a.$modelValue||a.$modelValue!==a.$modelValue&&b!==b||a.$$setModelValue(b);return b})}function Mc(a){this.$$options=a}function ie(a,b){r(b,function(b,c){w(a[c])||(a[c]=b)})} 10353function Oa(a,b){a.prop("selected",b);a.attr("selected",b)}function je(a,b,d){if(a){C(a)&&(a=new RegExp("^"+a+"$"));if(!a.test)throw F("ngPattern")("noregexp",b,a,Aa(d));return a}}function Ub(a){a=fa(a);return Y(a)?-1:a}var Xb={objectMaxDepth:5,urlErrorParamsEnabled:!0},ke=/^\/(.+)\/([a-z]*)$/,ta=Object.prototype.hasOwnProperty,K=function(a){return C(a)?a.toLowerCase():a},vb=function(a){return C(a)?a.toUpperCase():a},wa,x,sb,Ha=[].slice,Kg=[].splice,ph=[].push,la=Object.prototype.toString,Rc=Object.getPrototypeOf, 10354oa=F("ng"),ca=z.angular||(z.angular={}),lc,qb=0;wa=z.document.documentMode;var Y=Number.isNaN||function(a){return a!==a};E.$inject=[];Ta.$inject=[];var ze=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array]$/,V=function(a){return C(a)?a.trim():a},Od=function(a){return a.replace(/([-()[\]{}+?*.$^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},Ba=function(){if(!w(Ba.rules)){var a=z.document.querySelector("[ng-csp]")||z.document.querySelector("[data-ng-csp]");if(a){var b= 10355a.getAttribute("ng-csp")||a.getAttribute("data-ng-csp");Ba.rules={noUnsafeEval:!b||-1!==b.indexOf("no-unsafe-eval"),noInlineStyle:!b||-1!==b.indexOf("no-inline-style")}}else{a=Ba;try{new Function(""),b=!1}catch(d){b=!0}a.rules={noUnsafeEval:b,noInlineStyle:!1}}}return Ba.rules},rb=function(){if(w(rb.name_))return rb.name_;var a,b,d=Qa.length,c,e;for(b=0;b<d;++b)if(c=Qa[b],a=z.document.querySelector("["+c.replace(":","\\:")+"jq]")){e=a.getAttribute(c+"jq");break}return rb.name_=e},Be=/:/g,Qa=["ng-", 10356"data-ng-","ng:","x-ng-"],Fe=function(a){var b=a.currentScript;if(!b)return!0;if(!(b instanceof z.HTMLScriptElement||b instanceof z.SVGScriptElement))return!1;b=b.attributes;return[b.getNamedItem("src"),b.getNamedItem("href"),b.getNamedItem("xlink:href")].every(function(b){if(!b)return!0;if(!b.value)return!1;var c=a.createElement("a");c.href=b.value;if(a.location.origin===c.origin)return!0;switch(c.protocol){case "http:":case "https:":case "ftp:":case "blob:":case "file:":case "data:":return!0;default:return!1}})}(z.document), 10357Ie=/[A-Z]/g,Yc=!1,Pa=3,Pe={full:"1.8.
103572",major:1,minor:8,dot:2,codeName:"meteoric-mining
vendor: 74,290 bytes, lines 10357-10502
10357"};U.expando="ng339";var Ka=U.cache={},ug=1;U._data=function(a){return this.cache[a[this.expando]]||{}};var qg=/-([a-z])/g,qh=/^-ms-/,Bb={mouseleave:"mouseout",mouseenter:"mouseover"},oc=F("jqLite"),tg=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,nc=/<|&#?\w+;/,rg=/<([\w:-]+)/,sg=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,qa={thead:["table"],col:["colgroup","table"],tr:["tbody","table"],td:["tr", 10358"tbody","table"]};qa.tbody=qa.tfoot=qa.colgroup=qa.caption=qa.thead;qa.th=qa.td;var hb={option:[1,'<select multiple="multiple">',"</select>"],_default:[0,"",""]},Nc;for(Nc in qa){var le=qa[Nc],me=le.slice().reverse();hb[Nc]=[me.length,"<"+me.join("><")+">","</"+le.join("></")+">"]}hb.optgroup=hb.option;var zg=z.Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&16)},Wa=U.prototype={ready:hd,toString:function(){var a=[];r(this,function(b){a.push(""+b)});return"["+a.join(", ")+ 10359"]"},eq:function(a){return 0<=a?x(this[a]):x(this[this.length+a])},length:0,push:ph,sort:[].sort,splice:[].splice},Hb={};r("multiple selected checked disabled readOnly required open".split(" "),function(a){Hb[K(a)]=a});var od={};r("input select option textarea button form details".split(" "),function(a){od[a]=!0});var vd={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern",ngStep:"step"};r({data:sc,removeData:rc,hasData:function(a){for(var b in Ka[a.ng339])return!0; 10360return!1},cleanData:function(a){for(var b=0,d=a.length;b<d;b++)rc(a[b]),kd(a[b])}},function(a,b){U[b]=a});r({data:sc,inheritedData:Fb,scope:function(a){return x.data(a,"$scope")||Fb(a.parentNode||a,["$isolateScope","$scope"])},isolateScope:function(a){return x.data(a,"$isolateScope")||x.data(a,"$isolateScopeNoTemplate")},controller:ld,injector:function(a){return Fb(a,"$injector")},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:Cb,css:function(a,b,d){b=yb(b.replace(qh,"ms-"));if(w(d))a.style[b]= 10361d;else return a.style[b]},attr:function(a,b,d){var c=a.nodeType;if(c!==Pa&&2!==c&&8!==c&&a.getAttribute){var c=K(b),e=Hb[c];if(w(d))null===d||!1===d&&e?a.removeAttribute(b):a.setAttribute(b,e?c:d);else return a=a.getAttribute(b),e&&null!==a&&(a=c),null===a?void 0:a}},prop:function(a,b,d){if(w(d))a[b]=d;else return a[b]},text:function(){function a(a,d){if(A(d)){var c=a.nodeType;return 1===c||c===Pa?a.textContent:""}a.textContent=d}a.$dv="";return a}(),val:function(a,b){if(A(b)){if(a.multiple&&"select"=== 10362ua(a)){var d=[];r(a.options,function(a){a.selected&&d.push(a.value||a.text)});return d}return a.value}a.value=b},html:function(a,b){if(A(b))return a.innerHTML;zb(a,!0);a.innerHTML=b},empty:md},function(a,b){U.prototype[b]=function(b,c){var e,f,g=this.length;if(a!==md&&A(2===a.length&&a!==Cb&&a!==ld?b:c)){if(D(b)){for(e=0;e<g;e++)if(a===sc)a(this[e],b);else for(f in b)a(this[e],f,b[f]);return this}e=a.$dv;g=A(e)?Math.min(g,1):g;for(f=0;f<g;f++){var k=a(this[f],b,c);e=e?e+k:k}return e}for(e=0;e<g;e++)a(this[e], 10363b,c);return this}});r({removeData:rc,on:function(a,b,d,c){if(w(c))throw oc("onargs");if(mc(a)){c=Ab(a,!0);var e=c.events,f=c.handle;f||(f=c.handle=wg(a,e));c=0<=b.indexOf(" ")?b.split(" "):[b];for(var g=c.length,k=function(b,c,g){var k=e[b];k||(k=e[b]=[],k.specialHandlerWrapper=c,"$destroy"===b||g||a.addEventListener(b,f));k.push(d)};g--;)b=c[g],Bb[b]?(k(Bb[b],yg),k(b,void 0,!0)):k(b)}},off:kd,one:function(a,b,d){a=x(a);a.on(b,function e(){a.off(b,d);a.off(b,e)});a.on(b,d)},replaceWith:function(a, 10364b){var d,c=a.parentNode;zb(a);r(new U(b),function(b){d?c.insertBefore(b,d.nextSibling):c.replaceChild(b,a);d=b})},children:function(a){var b=[];r(a.childNodes,function(a){1===a.nodeType&&b.push(a)});return b},contents:function(a){return a.contentDocument||a.childNodes||[]},append:function(a,b){var d=a.nodeType;if(1===d||11===d){b=new U(b);for(var d=0,c=b.length;d<c;d++)a.appendChild(b[d])}},prepend:function(a,b){if(1===a.nodeType){var d=a.firstChild;r(new U(b),function(b){a.insertBefore(b,d)})}}, 10365wrap:function(a,b){var d=x(b).eq(0).clone()[0],c=a.parentNode;c&&c.replaceChild(d,a);d.appendChild(a)},remove:Gb,detach:function(a){Gb(a,!0)},after:function(a,b){var d=a,c=a.parentNode;if(c){b=new U(b);for(var e=0,f=b.length;e<f;e++){var g=b[e];c.insertBefore(g,d.nextSibling);d=g}}},addClass:Eb,removeClass:Db,toggleClass:function(a,b,d){b&&r(b.split(" "),function(b){var e=d;A(e)&&(e=!Cb(a,b));(e?Eb:Db)(a,b)})},parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},next:function(a){return a.nextElementSibling}, 10366find:function(a,b){return a.getElementsByTagName?a.getElementsByTagName(b):[]},clone:qc,triggerHandler:function(a,b,d){var c,e,f=b.type||b,g=Ab(a);if(g=(g=g&&g.events)&&g[f])c={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:E,type:f,target:a},b.type&&(c=S(c, 10367b)),b=ja(g),e=d?[c].concat(d):[c],r(b,function(b){c.isImmediatePropagationStopped()||b.apply(a,e)})}},function(a,b){U.prototype[b]=function(b,c,e){for(var f,g=0,k=this.length;g<k;g++)A(f)?(f=a(this[g],b,c,e),w(f)&&(f=x(f))):pc(f,a(this[g],b,c,e));return w(f)?f:this}});U.prototype.bind=U.prototype.on;U.prototype.unbind=U.prototype.off;var rh=Object.create(null);pd.prototype={_idx:function(a){a!==this._lastKey&&(this._lastKey=a,this._lastIndex=this._keys.indexOf(a));return this._lastIndex},_transformKey:function(a){return Y(a)? 10368rh:a},get:function(a){a=this._transformKey(a);a=this._idx(a);if(-1!==a)return this._values[a]},has:function(a){a=this._transformKey(a);return-1!==this._idx(a)},set:function(a,b){a=this._transformKey(a);var d=this._idx(a);-1===d&&(d=this._lastIndex=this._keys.length);this._keys[d]=a;this._values[d]=b},delete:function(a){a=this._transformKey(a);a=this._idx(a);if(-1===a)return!1;this._keys.splice(a,1);this._values.splice(a,1);this._lastKey=NaN;this._lastIndex=-1;return!0}};var Ib=pd,og=[function(){this.$get= 10369[function(){return Ib}]}],Bg=/^([^(]+?)=>/,Cg=/^[^(]*\(\s*([^)]*)\)/m,sh=/,/,th=/^\s*(_?)(\S+?)\1\s*$/,Ag=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Ca=F("$injector");fb.$$annotate=function(a,b,d){var c;if("function"===typeof a){if(!(c=a.$inject)){c=[];if(a.length){if(b)throw C(d)&&d||(d=a.name||Dg(a)),Ca("strictdi",d);b=qd(a);r(b[1].split(sh),function(a){a.replace(th,function(a,b,d){c.push(d)})})}a.$inject=c}}else H(a)?(b=a.length-1,tb(a[b],"fn"),c=a.slice(0,b)):tb(a,"fn",!0);return c};var ne=F("$animate"), 10370Ef=function(){this.$get=E},Ff=function(){var a=new Ib,b=[];this.$get=["$$AnimateRunner","$rootScope",function(d,c){function e(a,b,c){var d=!1;b&&(b=C(b)?b.split(" "):H(b)?b:[],r(b,function(b){b&&(d=!0,a[b]=c)}));return d}function f(){r(b,function(b){var c=a.get(b);if(c){var d=Eg(b.attr("class")),e="",f="";r(c,function(a,b){a!==!!d[b]&&(a?e+=(e.length?" ":"")+b:f+=(f.length?" ":"")+b)});r(b,function(a){e&&Eb(a,e);f&&Db(a,f)});a.delete(b)}});b.length=0}return{enabled:E,on:E,off:E,pin:E,push:function(g, 10371k,h,l){l&&l();h=h||{};h.from&&g.css(h.from);h.to&&g.css(h.to);if(h.addClass||h.removeClass)if(k=h.addClass,l=h.removeClass,h=a.get(g)||{},k=e(h,k,!0),l=e(h,l,!1),k||l)a.set(g,h),b.push(g),1===b.length&&c.$$postDigest(f);g=new d;g.complete();return g}}}]},Cf=["$provide",function(a){var b=this,d=null,c=null;this.$$registeredAnimations=Object.create(null);this.register=function(c,d){if(c&&"."!==c.charAt(0))throw ne("notcsel",c);var g=c+"-animation";b.$$registeredAnimations[c.substr(1)]=g;a.factory(g, 10372d)};this.customFilter=function(a){1===arguments.length&&(c=B(a)?a:null);return c};this.classNameFilter=function(a){if(1===arguments.length&&(d=a instanceof RegExp?a:null)&&/[(\s|\/)]ng-animate[(\s|\/)]/.test(d.toString()))throw d=null,ne("nongcls","ng-animate");return d};this.$get=["$$animateQueue",function(a){function b(a,c,d){if(d){var e;a:{for(e=0;e<d.length;e++){var f=d[e];if(1===f.nodeType){e=f;break a}}e=void 0}!e||e.parentNode||e.previousElementSibling||(d=null)}d?d.after(a):c.prepend(a)}return{on:a.on, 10373off:a.off,pin:a.pin,enabled:a.enabled,cancel:function(a){a.cancel&&a.cancel()},enter:function(c,d,h,l){d=d&&x(d);h=h&&x(h);d=d||h.parent();b(c,d,h);return a.push(c,"enter",ra(l))},move:function(c,d,h,l){d=d&&x(d);h=h&&x(h);d=d||h.parent();b(c,d,h);return a.push(c,"move",ra(l))},leave:function(b,c){return a.push(b,"leave",ra(c),function(){b.remove()})},addClass:function(b,c,d){d=ra(d);d.addClass=ib(d.addclass,c);return a.push(b,"addClass",d)},removeClass:function(b,c,d){d=ra(d);d.removeClass=ib(d.removeClass, 10374c);return a.push(b,"removeClass",d)},setClass:function(b,c,d,f){f=ra(f);f.addClass=ib(f.addClass,c);f.removeClass=ib(f.removeClass,d);return a.push(b,"setClass",f)},animate:function(b,c,d,f,m){m=ra(m);m.from=m.from?S(m.from,c):c;m.to=m.to?S(m.to,d):d;m.tempClasses=ib(m.tempClasses,f||"ng-inline-animate");return a.push(b,"animate",m)}}}]}],Hf=function(){this.$get=["$$rAF",function(a){function b(b){d.push(b);1<d.length||a(function(){for(var a=0;a<d.length;a++)d[a]();d=[]})}var d=[];return function(){var a= 10375!1;b(function(){a=!0});return function(d){a?d():b(d)}}}]},Gf=function(){this.$get=["$q","$sniffer","$$animateAsyncRun","$$isDocumentHidden","$timeout",function(a,b,d,c,e){function f(a){this.setHost(a);var b=d();this._doneCallbacks=[];this._tick=function(a){c()?e(a,0,!1):b(a)};this._state=0}f.chain=function(a,b){function c(){if(d===a.length)b(!0);else a[d](function(a){!1===a?b(!1):(d++,c())})}var d=0;c()};f.all=function(a,b){function c(f){e=e&&f;++d===a.length&&b(e)}var d=0,e=!0;r(a,function(a){a.done(c)})}; 10376f.prototype={setHost:function(a){this.host=a||{}},done:function(a){2===this._state?a():this._doneCallbacks.push(a)},progress:E,getPromise:function(){if(!this.promise){var b=this;this.promise=a(function(a,c){b.done(function(b){!1===b?c():a()})})}return this.promise},then:function(a,b){return this.getPromise().then(a,b)},"catch":function(a){return this.getPromise()["catch"](a)},"finally":function(a){return this.getPromise()["finally"](a)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&& 10377this.host.resume()},end:function(){this.host.end&&this.host.end();this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel();this._resolve(!1)},complete:function(a){var b=this;0===b._state&&(b._state=1,b._tick(function(){b._resolve(a)}))},_resolve:function(a){2!==this._state&&(r(this._doneCallbacks,function(b){b(a)}),this._doneCallbacks.length=0,this._state=2)}};return f}]},Df=function(){this.$get=["$$rAF","$q","$$AnimateRunner",function(a,b,d){return function(b,e){function f(){a(function(){g.addClass&& 10378(b.addClass(g.addClass),g.addClass=null);g.removeClass&&(b.removeClass(g.removeClass),g.removeClass=null);g.to&&(b.css(g.to),g.to=null);k||h.complete();k=!0});return h}var g=e||{};g.$$prepared||(g=Ia(g));g.cleanupStyles&&(g.from=g.to=null);g.from&&(b.css(g.from),g.from=null);var k,h=new d;return{start:f,end:f}}}]},$=F("$compile"),uc=new function(){};Zc.$inject=["$provide","$$sanitizeUriProvider"];Kb.prototype.isFirstChange=function(){return this.previousValue===uc};var rd=/^((?:x|data)[:\-_])/i,Jg= 10379/[:\-_]+(.)/g,xd=F("$controller"),wd=/^(\S+)(\s+as\s+([\w$]+))?$/,Of=function(){this.$get=["$document",function(a){return function(b){b?!b.nodeType&&b instanceof x&&(b=b[0]):b=a[0].body;return b.offsetWidth+1}}]},yd="application/json",xc={"Content-Type":yd+";charset=utf-8"},Mg=/^\[|^\{(?!\{)/,Ng={"[":/]$/,"{":/}$/},Lg=/^\)]\}',?\n/,Lb=F("$http"),Ma=ca.$interpolateMinErr=F("$interpolate");Ma.throwNoconcat=function(a){throw Ma("noconcat",a);};Ma.interr=function(a,b){return Ma("interr",a,b.toString())}; 10380var Qg=F("$interval"),Xf=function(){this.$get=function(){function a(a){var b=function(a){b.data=a;b.called=!0};b.id=a;return b}var b=ca.callbacks,d={};return{createCallback:function(c){c="_"+(b.$$counter++).toString(36);var e="angular.callbacks."+c,f=a(c);d[e]=b[c]=f;return e},wasCalled:function(a){return d[a].called},getResponse:function(a){return d[a].data},removeCallback:function(a){delete b[d[a].id];delete d[a]}}}},uh=/^([^?#]*)(\?([^#]*))?(#(.*))?$/,Rg={http:80,https:443,ftp:21},kb=F("$location"), 10381Sg=/^\s*[\\/]{2,}/,vh={$$absUrl:"",$$html5:!1,$$replace:!1,$$compose:function(){for(var a=this.$$path,b=this.$$hash,d=Ce(this.$$search),b=b?"#"+ic(b):"",a=a.split("/"),c=a.length;c--;)a[c]=ic(a[c].replace(/%2F/g,"/"));this.$$url=a.join("/")+(d?"?"+d:"")+b;this.$$absUrl=this.$$normalizeUrl(this.$$url);this.$$urlUpdatedByLocation=!0},absUrl:Mb("$$absUrl"),url:function(a){if(A(a))return this.$$url;var b=uh.exec(a);(b[1]||""===a)&&this.path(decodeURIComponent(b[1]));(b[2]||b[1]||""===a)&&this.search(b[3]|| 10382"");this.hash(b[5]||"");return this},protocol:Mb("$$protocol"),host:Mb("$$host"),port:Mb("$$port"),path:Fd("$$path",function(a){a=null!==a?a.toString():"";return"/"===a.charAt(0)?a:"/"+a}),search:function(a,b){switch(arguments.length){case 0:return this.$$search;case 1:if(C(a)||X(a))a=a.toString(),this.$$search=hc(a);else if(D(a))a=Ia(a,{}),r(a,function(b,c){null==b&&delete a[c]}),this.$$search=a;else throw kb("isrcharg");break;default:A(b)||null===b?delete this.$$search[a]:this.$$search[a]=b}this.$$compose(); 10383return this},hash:Fd("$$hash",function(a){return null!==a?a.toString():""}),replace:function(){this.$$replace=!0;return this}};r([Ed,Ac,zc],function(a){a.prototype=Object.create(vh);a.prototype.state=function(b){if(!arguments.length)return this.$$state;if(a!==zc||!this.$$html5)throw kb("nostate");this.$$state=A(b)?null:b;this.$$urlUpdatedByLocation=!0;return this}});var Ya=F("$parse"),Wg={}.constructor.prototype.valueOf,Vb=T();r("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(a){Vb[a]= 10384!0});var wh={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Ob=function(a){this.options=a};Ob.prototype={constructor:Ob,lex:function(a){this.text=a;this.index=0;for(this.tokens=[];this.index<this.text.length;)if(a=this.text.charAt(this.index),'"'===a||"'"===a)this.readString(a);else if(this.isNumber(a)||"."===a&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdentifierStart(this.peekMultichar()))this.readIdent();else if(this.is(a,"(){}[].,;:?"))this.tokens.push({index:this.index, 10385text:a}),this.index++;else if(this.isWhitespace(a))this.index++;else{var b=a+this.peek(),d=b+this.peek(2),c=Vb[b],e=Vb[d];Vb[a]||c||e?(a=e?d:c?b:a,this.tokens.push({index:this.index,text:a,operator:!0}),this.index+=a.length):this.throwError("Unexpected next character ",this.index,this.index+1)}return this.tokens},is:function(a,b){return-1!==b.indexOf(a)},peek:function(a){a=a||1;return this.index+a<this.text.length?this.text.charAt(this.index+a):!1},isNumber:function(a){return"0"<=a&&"9">=a&&"string"=== 10386typeof a},isWhitespace:function(a){return" "===a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdentifierStart:function(a){return this.options.isIdentifierStart?this.options.isIdentifierStart(a,this.codePointAt(a)):this.isValidIdentifierStart(a)},isValidIdentifierStart:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isIdentifierContinue:function(a){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(a,this.codePointAt(a)):this.isValidIdentifierContinue(a)}, 10387isValidIdentifierContinue:function(a,b){return this.isValidIdentifierStart(a,b)||this.isNumber(a)},codePointAt:function(a){return 1===a.length?a.charCodeAt(0):(a.charCodeAt(0)<<10)+a.charCodeAt(1)-56613888},peekMultichar:function(){var a=this.text.charAt(this.index),b=this.peek();if(!b)return a;var d=a.charCodeAt(0),c=b.charCodeAt(0);return 55296<=d&&56319>=d&&56320<=c&&57343>=c?a+b:a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,d){d=d||this.index;b= 10388w(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,d)+"]":" "+d;throw Ya("lexerr",a,b,this.text);},readNumber:function(){for(var a="",b=this.index;this.index<this.text.length;){var d=K(this.text.charAt(this.index));if("."===d||this.isNumber(d))a+=d;else{var c=this.peek();if("e"===d&&this.isExpOperator(c))a+=d;else if(this.isExpOperator(d)&&c&&this.isNumber(c)&&"e"===a.charAt(a.length-1))a+=d;else if(!this.isExpOperator(d)||c&&this.isNumber(c)||"e"!==a.charAt(a.length-1))break;else this.throwError("Invalid exponent")}this.index++}this.tokens.push({index:b, 10389text:a,constant:!0,value:Number(a)})},readIdent:function(){var a=this.index;for(this.index+=this.peekMultichar().length;this.index<this.text.length;){var b=this.peekMultichar();if(!this.isIdentifierContinue(b))break;this.index+=b.length}this.tokens.push({index:a,text:this.text.slice(a,this.index),identifier:!0})},readString:function(a){var b=this.index;this.index++;for(var d="",c=a,e=!1;this.index<this.text.length;){var f=this.text.charAt(this.index),c=c+f;if(e)"u"===f?(e=this.text.substring(this.index+ 103901,this.index+5),e.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+e+"]"),this.index+=4,d+=String.fromCharCode(parseInt(e,16))):d+=wh[f]||f,e=!1;else if("\\"===f)e=!0;else{if(f===a){this.index++;this.tokens.push({index:b,text:c,constant:!0,value:d});return}d+=f}this.index++}this.throwError("Unterminated quote",b)}};var q=function(a,b){this.lexer=a;this.options=b};q.Program="Program";q.ExpressionStatement="ExpressionStatement";q.AssignmentExpression="AssignmentExpression";q.ConditionalExpression= 10391"ConditionalExpression";q.LogicalExpression="LogicalExpression";q.BinaryExpression="BinaryExpression";q.UnaryExpression="UnaryExpression";q.CallExpression="CallExpression";q.MemberExpression="MemberExpression";q.Identifier="Identifier";q.Literal="Literal";q.ArrayExpression="ArrayExpression";q.Property="Property";q.ObjectExpression="ObjectExpression";q.ThisExpression="ThisExpression";q.LocalsExpression="LocalsExpression";q.NGValueParameter="NGValueParameter";q.prototype={ast:function(a){this.text= 10392a;this.tokens=this.lexer.lex(a);a=this.program();0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]);return a},program:function(){for(var a=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&a.push(this.expressionStatement()),!this.expect(";"))return{type:q.Program,body:a}},expressionStatement:function(){return{type:q.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var a=this.expression();this.expect("|");)a=this.filter(a);return a}, 10393expression:function(){return this.assignment()},assignment:function(){var a=this.ternary();if(this.expect("=")){if(!Jd(a))throw Ya("lval");a={type:q.AssignmentExpression,left:a,right:this.assignment(),operator:"="}}return a},ternary:function(){var a=this.logicalOR(),b,d;return this.expect("?")&&(b=this.expression(),this.consume(":"))?(d=this.expression(),{type:q.ConditionalExpression,test:a,alternate:b,consequent:d}):a},logicalOR:function(){for(var a=this.logicalAND();this.expect("||");)a={type:q.LogicalExpression, 10394operator:"||",left:a,right:this.logicalAND()};return a},logicalAND:function(){for(var a=this.equality();this.expect("&&");)a={type:q.LogicalExpression,operator:"&&",left:a,right:this.equality()};return a},equality:function(){for(var a=this.relational(),b;b=this.expect("==","!=","===","!==");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.relational()};return a},relational:function(){for(var a=this.additive(),b;b=this.expect("<",">","<=",">=");)a={type:q.BinaryExpression,operator:b.text, 10395left:a,right:this.additive()};return a},additive:function(){for(var a=this.multiplicative(),b;b=this.expect("+","-");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.multiplicative()};return a},multiplicative:function(){for(var a=this.unary(),b;b=this.expect("*","/","%");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.unary()};return a},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:q.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()}, 10396primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?a=Ia(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?a={type:q.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression", 10397this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:q.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):"["===b.text?(a={type:q.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:q.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){a=[a];for(var b={type:q.CallExpression,callee:this.identifier(),arguments:a,filter:!0};this.expect(":");)a.push(this.expression()); 10398return b},parseArguments:function(){var a=[];if(")"!==this.peekToken().text){do a.push(this.filterChain());while(this.expect(","))}return a},identifier:function(){var a=this.consume();a.identifier||this.throwError("is not a valid identifier",a);return{type:q.Identifier,name:a.text}},constant:function(){return{type:q.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text){do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","))}this.consume("]"); 10399return{type:q.ArrayExpression,elements:a}},object:function(){var a=[],b;if("}"!==this.peekToken().text){do{if(this.peek("}"))break;b={type:q.Property,kind:"init"};this.peek().constant?(b.key=this.constant(),b.computed=!1,this.consume(":"),b.value=this.expression()):this.peek().identifier?(b.key=this.identifier(),b.computed=!1,this.peek(":")?(this.consume(":"),b.value=this.expression()):b.value=b.key):this.peek("[")?(this.consume("["),b.key=this.expression(),this.consume("]"),b.computed=!0,this.consume(":"), 10400b.value=this.expression()):this.throwError("invalid key",this.peek());a.push(b)}while(this.expect(","))}this.consume("}");return{type:q.ObjectExpression,properties:a}},throwError:function(a,b){throw Ya("syntax",b.text,a,b.index+1,this.text,this.text.substring(b.index));},consume:function(a){if(0===this.tokens.length)throw Ya("ueoe",this.text);var b=this.expect(a);b||this.throwError("is unexpected, expecting ["+a+"]",this.peek());return b},peekToken:function(){if(0===this.tokens.length)throw Ya("ueoe", 10401this.text);return this.tokens[0]},peek:function(a,b,d,c){return this.peekAhead(0,a,b,d,c)},peekAhead:function(a,b,d,c,e){if(this.tokens.length>a){a=this.tokens[a];var f=a.text;if(f===b||f===d||f===c||f===e||!(b||d||c||e))return a}return!1},expect:function(a,b,d,c){return(a=this.peek(a,b,d,c))?(this.tokens.shift(),a):!1},selfReferential:{"this":{type:q.ThisExpression},$locals:{type:q.LocalsExpression}}};var Hd=2;Ld.prototype={compile:function(a){var b=this;this.state={nextId:0,filters:{},fn:{vars:[], 10402body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]};Z(a,b.$filter);var d="",c;this.stage="assign";if(c=Kd(a))this.state.computing="assign",d=this.nextId(),this.recurse(c,d),this.return_(d),d="fn.assign="+this.generateFunction("assign","s,v,l");c=Id(a.body);b.stage="inputs";r(c,function(a,c){var d="fn"+c;b.state[d]={vars:[],body:[],own:{}};b.state.computing=d;var k=b.nextId();b.recurse(a,k);b.return_(k);b.state.inputs.push({name:d,isPure:a.isPure});a.watchId=c});this.state.computing="fn";this.stage= 10403"main";this.recurse(a);a='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+d+this.watchFns()+"return fn;";a=(new Function("$filter","getStringValue","ifDefined","plus",a))(this.$filter,Tg,Ug,Gd);this.state=this.stage=void 0;return a},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,d=this;r(b,function(b){a.push("var "+b.name+"="+d.generateFunction(b.name,"s"));b.isPure&&a.push(b.name,".isPure="+JSON.stringify(b.isPure)+ 10404";")});b.length&&a.push("fn.inputs=["+b.map(function(a){return a.name}).join(",")+"];");return a.join("")},generateFunction:function(a,b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;r(this.state.filters,function(d,c){a.push(d+"=$filter("+b.escape(c)+")")});return a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")}, 10405recurse:function(a,b,d,c,e,f){var g,k,h=this,l,m,p;c=c||E;if(!f&&w(a.watchId))b=b||this.nextId(),this.if_("i",this.lazyAssign(b,this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,d,c,e,!0));else switch(a.type){case q.Program:r(a.body,function(b,c){h.recurse(b.expression,void 0,void 0,function(a){k=a});c!==a.body.length-1?h.current().body.push(k,";"):h.return_(k)});break;case q.Literal:m=this.escape(a.value);this.assign(b,m);c(b||m);break;case q.UnaryExpression:this.recurse(a.argument,void 0, 10406void 0,function(a){k=a});m=a.operator+"("+this.ifDefined(k,0)+")";this.assign(b,m);c(m);break;case q.BinaryExpression:this.recurse(a.left,void 0,void 0,function(a){g=a});this.recurse(a.right,void 0,void 0,function(a){k=a});m="+"===a.operator?this.plus(g,k):"-"===a.operator?this.ifDefined(g,0)+a.operator+this.ifDefined(k,0):"("+g+")"+a.operator+"("+k+")";this.assign(b,m);c(m);break;case q.LogicalExpression:b=b||this.nextId();h.recurse(a.left,b);h.if_("&&"===a.operator?b:h.not(b),h.lazyRecurse(a.right, 10407b));c(b);break;case q.ConditionalExpression:b=b||this.nextId();h.recurse(a.test,b);h.if_(b,h.lazyRecurse(a.alternate,b),h.lazyRecurse(a.consequent,b));c(b);break;case q.Identifier:b=b||this.nextId();d&&(d.context="inputs"===h.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),d.computed=!1,d.name=a.name);h.if_("inputs"===h.stage||h.not(h.getHasOwnProperty("l",a.name)),function(){h.if_("inputs"===h.stage||"s",function(){e&&1!==e&&h.if_(h.isNull(h.nonComputedMember("s",a.name)), 10408h.lazyAssign(h.nonComputedMember("s",a.name),"{}"));h.assign(b,h.nonComputedMember("s",a.name))})},b&&h.lazyAssign(b,h.nonComputedMember("l",a.name)));c(b);break;case q.MemberExpression:g=d&&(d.context=this.nextId())||this.nextId();b=b||this.nextId();h.recurse(a.object,g,void 0,function(){h.if_(h.notNull(g),function(){a.computed?(k=h.nextId(),h.recurse(a.property,k),h.getStringValue(k),e&&1!==e&&h.if_(h.not(h.computedMember(g,k)),h.lazyAssign(h.computedMember(g,k),"{}")),m=h.computedMember(g,k),h.assign(b, 10409m),d&&(d.computed=!0,d.name=k)):(e&&1!==e&&h.if_(h.isNull(h.nonComputedMember(g,a.property.name)),h.lazyAssign(h.nonComputedMember(g,a.property.name),"{}")),m=h.nonComputedMember(g,a.property.name),h.assign(b,m),d&&(d.computed=!1,d.name=a.property.name))},function(){h.assign(b,"undefined")});c(b)},!!e);break;case q.CallExpression:b=b||this.nextId();a.filter?(k=h.filter(a.callee.name),l=[],r(a.arguments,function(a){var b=h.nextId();h.recurse(a,b);l.push(b)}),m=k+"("+l.join(",")+")",h.assign(b,m),c(b)): 10410(k=h.nextId(),g={},l=[],h.recurse(a.callee,k,g,function(){h.if_(h.notNull(k),function(){r(a.arguments,function(b){h.recurse(b,a.constant?void 0:h.nextId(),void 0,function(a){l.push(a)})});m=g.name?h.member(g.context,g.name,g.computed)+"("+l.join(",")+")":k+"("+l.join(",")+")";h.assign(b,m)},function(){h.assign(b,"undefined")});c(b)}));break;case q.AssignmentExpression:k=this.nextId();g={};this.recurse(a.left,void 0,g,function(){h.if_(h.notNull(g.context),function(){h.recurse(a.right,k);m=h.member(g.context, 10411g.name,g.computed)+a.operator+k;h.assign(b,m);c(b||m)})},1);break;case q.ArrayExpression:l=[];r(a.elements,function(b){h.recurse(b,a.constant?void 0:h.nextId(),void 0,function(a){l.push(a)})});m="["+l.join(",")+"]";this.assign(b,m);c(b||m);break;case q.ObjectExpression:l=[];p=!1;r(a.properties,function(a){a.computed&&(p=!0)});p?(b=b||this.nextId(),this.assign(b,"{}"),r(a.properties,function(a){a.computed?(g=h.nextId(),h.recurse(a.key,g)):g=a.key.type===q.Identifier?a.key.name:""+a.key.value;k=h.nextId(); 10412h.recurse(a.value,k);h.assign(h.member(b,g,a.computed),k)})):(r(a.properties,function(b){h.recurse(b.value,a.constant?void 0:h.nextId(),void 0,function(a){l.push(h.escape(b.key.type===q.Identifier?b.key.name:""+b.key.value)+":"+a)})}),m="{"+l.join(",")+"}",this.assign(b,m));c(b||m);break;case q.ThisExpression:this.assign(b,"s");c(b||"s");break;case q.LocalsExpression:this.assign(b,"l");c(b||"l");break;case q.NGValueParameter:this.assign(b,"v"),c(b||"v")}},getHasOwnProperty:function(a,b){var d=a+"."+ 10413b,c=this.current().own;c.hasOwnProperty(d)||(c[d]=this.nextId(!1,a+"&&("+this.escape(b)+" in "+a+")"));return c[d]},assign:function(a,b){if(a)return this.current().body.push(a,"=",b,";"),a},filter:function(a){this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0));return this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a, 10414b,d){if(!0===a)b();else{var c=this.current().body;c.push("if(",a,"){");b();c.push("}");d&&(c.push("else{"),d(),c.push("}"))}},not:function(a){return"!("+a+")"},isNull:function(a){return a+"==null"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){var d=/[^$_a-zA-Z0-9]/g;return/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(b)?a+"."+b:a+'["'+b.replace(d,this.stringEscapeFn)+'"]'},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,d){return d?this.computedMember(a,b):this.nonComputedMember(a, 10415b)},getStringValue:function(a){this.assign(a,"getStringValue("+a+")")},lazyRecurse:function(a,b,d,c,e,f){var g=this;return function(){g.recurse(a,b,d,c,e,f)}},lazyAssign:function(a,b){var d=this;return function(){d.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(C(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(X(a))return a.toString();if(!0===a)return"true";if(!1=== 10416a)return"false";if(null===a)return"null";if("undefined"===typeof a)return"undefined";throw Ya("esc");},nextId:function(a,b){var d="v"+this.state.nextId++;a||this.current().vars.push(d+(b?"="+b:""));return d},current:function(){return this.state[this.state.computing]}};Md.prototype={compile:function(a){var b=this;Z(a,b.$filter);var d,c;if(d=Kd(a))c=this.recurse(d);d=Id(a.body);var e;d&&(e=[],r(d,function(a,c){var d=b.recurse(a);d.isPure=a.isPure;a.input=d;e.push(d);a.watchId=c}));var f=[];r(a.body, 10417function(a){f.push(b.recurse(a.expression))});a=0===a.body.length?E:1===a.body.length?f[0]:function(a,b){var c;r(f,function(d){c=d(a,b)});return c};c&&(a.assign=function(a,b,d){return c(a,d,b)});e&&(a.inputs=e);return a},recurse:function(a,b,d){var c,e,f=this,g;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case q.Literal:return this.value(a.value,b);case q.UnaryExpression:return e=this.recurse(a.argument),this["unary"+a.operator](e,b);case q.BinaryExpression:return c=this.recurse(a.left), 10418e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case q.LogicalExpression:return c=this.recurse(a.left),e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case q.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case q.Identifier:return f.identifier(a.name,b,d);case q.MemberExpression:return c=this.recurse(a.object,!1,!!d),a.computed||(e=a.property.name),a.computed&&(e=this.recurse(a.property)),a.computed?this.computedMember(c, 10419e,b,d):this.nonComputedMember(c,e,b,d);case q.CallExpression:return g=[],r(a.arguments,function(a){g.push(f.recurse(a))}),a.filter&&(e=this.$filter(a.callee.name)),a.filter||(e=this.recurse(a.callee,!0)),a.filter?function(a,c,d,f){for(var p=[],n=0;n<g.length;++n)p.push(g[n](a,c,d,f));a=e.apply(void 0,p,f);return b?{context:void 0,name:void 0,value:a}:a}:function(a,c,d,f){var p=e(a,c,d,f),n;if(null!=p.value){n=[];for(var s=0;s<g.length;++s)n.push(g[s](a,c,d,f));n=p.value.apply(p.context,n)}return b? 10420{value:n}:n};case q.AssignmentExpression:return c=this.recurse(a.left,!0,1),e=this.recurse(a.right),function(a,d,f,g){var p=c(a,d,f,g);a=e(a,d,f,g);p.context[p.name]=a;return b?{value:a}:a};case q.ArrayExpression:return g=[],r(a.elements,function(a){g.push(f.recurse(a))}),function(a,c,d,e){for(var f=[],n=0;n<g.length;++n)f.push(g[n](a,c,d,e));return b?{value:f}:f};case q.ObjectExpression:return g=[],r(a.properties,function(a){a.computed?g.push({key:f.recurse(a.key),computed:!0,value:f.recurse(a.value)}): 10421g.push({key:a.key.type===q.Identifier?a.key.name:""+a.key.value,computed:!1,value:f.recurse(a.value)})}),function(a,c,d,e){for(var f={},n=0;n<g.length;++n)g[n].computed?f[g[n].key(a,c,d,e)]=g[n].value(a,c,d,e):f[g[n].key]=g[n].value(a,c,d,e);return b?{value:f}:f};case q.ThisExpression:return function(a){return b?{value:a}:a};case q.LocalsExpression:return function(a,c){return b?{value:c}:c};case q.NGValueParameter:return function(a,c,d){return b?{value:d}:d}}},"unary+":function(a,b){return function(d, 10422c,e,f){d=a(d,c,e,f);d=w(d)?+d:0;return b?{value:d}:d}},"unary-":function(a,b){return function(d,c,e,f){d=a(d,c,e,f);d=w(d)?-d:-0;return b?{value:d}:d}},"unary!":function(a,b){return function(d,c,e,f){d=!a(d,c,e,f);return b?{value:d}:d}},"binary+":function(a,b,d){return function(c,e,f,g){var k=a(c,e,f,g);c=b(c,e,f,g);k=Gd(k,c);return d?{value:k}:k}},"binary-":function(a,b,d){return function(c,e,f,g){var k=a(c,e,f,g);c=b(c,e,f,g);k=(w(k)?k:0)-(w(c)?c:0);return d?{value:k}:k}},"binary*":function(a,b, 10423d){return function(c,e,f,g){c=a(c,e,f,g)*b(c,e,f,g);return d?{value:c}:c}},"binary/":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)/b(c,e,f,g);return d?{value:c}:c}},"binary%":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)%b(c,e,f,g);return d?{value:c}:c}},"binary===":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)===b(c,e,f,g);return d?{value:c}:c}},"binary!==":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)!==b(c,e,f,g);return d?{value:c}:c}},"binary==":function(a,b,d){return function(c, 10424e,f,g){c=a(c,e,f,g)==b(c,e,f,g);return d?{value:c}:c}},"binary!=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)!=b(c,e,f,g);return d?{value:c}:c}},"binary<":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<b(c,e,f,g);return d?{value:c}:c}},"binary>":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>b(c,e,f,g);return d?{value:c}:c}},"binary<=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<=b(c,e,f,g);return d?{value:c}:c}},"binary>=":function(a,b,d){return function(c,e,f,g){c= 10425a(c,e,f,g)>=b(c,e,f,g);return d?{value:c}:c}},"binary&&":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)&&b(c,e,f,g);return d?{value:c}:c}},"binary||":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)||b(c,e,f,g);return d?{value:c}:c}},"ternary?:":function(a,b,d,c){return function(e,f,g,k){e=a(e,f,g,k)?b(e,f,g,k):d(e,f,g,k);return c?{value:e}:e}},value:function(a,b){return function(){return b?{context:void 0,name:void 0,value:a}:a}},identifier:function(a,b,d){return function(c,e,f,g){c= 10426e&&a in e?e:c;d&&1!==d&&c&&null==c[a]&&(c[a]={});e=c?c[a]:void 0;return b?{context:c,name:a,value:e}:e}},computedMember:function(a,b,d,c){return function(e,f,g,k){var h=a(e,f,g,k),l,m;null!=h&&(l=b(e,f,g,k),l+="",c&&1!==c&&h&&!h[l]&&(h[l]={}),m=h[l]);return d?{context:h,name:l,value:m}:m}},nonComputedMember:function(a,b,d,c){return function(e,f,g,k){e=a(e,f,g,k);c&&1!==c&&e&&null==e[b]&&(e[b]={});f=null!=e?e[b]:void 0;return d?{context:e,name:b,value:f}:f}},inputs:function(a,b){return function(d, 10427c,e,f){return f?f[b]:a(d,c,e)}}};Nb.prototype={constructor:Nb,parse:function(a){a=this.getAst(a);var b=this.astCompiler.compile(a.ast),d=a.ast;b.literal=0===d.body.length||1===d.body.length&&(d.body[0].expression.type===q.Literal||d.body[0].expression.type===q.ArrayExpression||d.body[0].expression.type===q.ObjectExpression);b.constant=a.ast.constant;b.oneTime=a.oneTime;return b},getAst:function(a){var b=!1;a=a.trim();":"===a.charAt(0)&&":"===a.charAt(1)&&(b=!0,a=a.substring(2));return{ast:this.ast.ast(a), 10428oneTime:b}}};var Ea=F("$sce"),W={HTML:"html",CSS:"css",MEDIA_URL:"mediaUrl",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Dc=/_([a-z])/g,Zg=F("$templateRequest"),$g=F("$timeout"),aa=z.document.createElement("a"),Qd=ga(z.location.href),Na;aa.href="http://[::1]";var ah="[::1]"===aa.hostname;Rd.$inject=["$document"];fd.$inject=["$provide"];var Yd=22,Xd=".",Fc="0";Sd.$inject=["$locale"];Ud.$inject=["$locale"];var lh={yyyy:ea("FullYear",4,0,!1,!0),yy:ea("FullYear",2,0,!0,!0),y:ea("FullYear",1,0,!1,!0), 10429MMMM:lb("Month"),MMM:lb("Month",!0),MM:ea("Month",2,1),M:ea("Month",1,1),LLLL:lb("Month",!1,!0),dd:ea("Date",2),d:ea("Date",1),HH:ea("Hours",2),H:ea("Hours",1),hh:ea("Hours",2,-12),h:ea("Hours",1,-12),mm:ea("Minutes",2),m:ea("Minutes",1),ss:ea("Seconds",2),s:ea("Seconds",1),sss:ea("Milliseconds",3),EEEE:lb("Day"),EEE:lb("Day",!0),a:function(a,b){return 12>a.getHours()?b.AMPMS[0]:b.AMPMS[1]},Z:function(a,b,d){a=-1*d;return a=(0<=a?"+":"")+(Pb(Math[0<a?"floor":"ceil"](a/60),2)+Pb(Math.abs(a%60),2))}, 10430ww:$d(2),w:$d(1),G:Gc,GG:Gc,GGG:Gc,GGGG:function(a,b){return 0>=a.getFullYear()?b.ERANAMES[0]:b.ERANAMES[1]}},kh=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))([\s\S]*)/,jh=/^-?\d+$/;Td.$inject=["$locale"];var eh=ia(K),fh=ia(vb);Vd.$inject=["$parse"];var Re=ia({restrict:"E",compile:function(a,b){if(!b.href&&!b.xlinkHref)return function(a,b){if("a"===b[0].nodeName.toLowerCase()){var e="[object SVGAnimatedString]"===la.call(b.prop("href"))?"xlink:href":"href"; 10431b.on("click",function(a){b.attr(e)||a.preventDefault()})}}}}),wb={};r(Hb,function(a,b){function d(a,d,e){a.$watch(e[c],function(a){e.$set(b,!!a)})}if("multiple"!==a){var c=xa("ng-"+b),e=d;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[c]&&d(a,b,e)});wb[c]=function(){return{restrict:"A",priority:100,link:e}}}});r(vd,function(a,b){wb[b]=function(){return{priority:100,link:function(a,c,e){if("ngPattern"===b&&"/"===e.ngPattern.charAt(0)&&(c=e.ngPattern.match(ke))){e.$set("ngPattern",new RegExp(c[1], 10432c[2]));return}a.$watch(e[b],function(a){e.$set(b,a)})}}}});r(["src","srcset","href"],function(a){var b=xa("ng-"+a);wb[b]=["$sce",function(d){return{priority:99,link:function(c,e,f){var g=a,k=a;"href"===a&&"[object SVGAnimatedString]"===la.call(e.prop("href"))&&(k="xlinkHref",f.$attr[k]="xlink:href",g=null);f.$set(b,d.getTrustedMediaUrl(f[b]));f.$observe(b,function(b){b?(f.$set(k,b),wa&&g&&e.prop(g,f[k])):"href"===a&&f.$set(k,null)})}}}]});var mb={$addControl:E,$getControls:ia([]),$$renameControl:function(a, 10433b){a.$name=b},$removeControl:E,$setValidity:E,$setDirty:E,$setPristine:E,$setSubmitted:E,$$setSubmitted:E};Qb.$inject=["$element","$attrs","$scope","$animate","$interpolate"];Qb.prototype={$rollbackViewValue:function(){r(this.$$controls,function(a){a.$rollbackViewValue()})},$commitViewValue:function(){r(this.$$controls,function(a){a.$commitViewValue()})},$addControl:function(a){Ja(a.$name,"input");this.$$controls.push(a);a.$name&&(this[a.$name]=a);a.$$parentForm=this},$getControls:function(){return ja(this.$$controls)}, 10434$$renameControl:function(a,b){var d=a.$name;this[d]===a&&delete this[d];this[b]=a;a.$name=b},$removeControl:function(a){a.$name&&this[a.$name]===a&&delete this[a.$name];r(this.$pending,function(b,d){this.$setValidity(d,null,a)},this);r(this.$error,function(b,d){this.$setValidity(d,null,a)},this);r(this.$$success,function(b,d){this.$setValidity(d,null,a)},this);cb(this.$$controls,a);a.$$parentForm=mb},$setDirty:function(){this.$$animate.removeClass(this.$$element,Za);this.$$animate.addClass(this.$$element, 10435Wb);this.$dirty=!0;this.$pristine=!1;this.$$parentForm.$setDirty()},$setPristine:function(){this.$$animate.setClass(this.$$element,Za,Wb+" ng-submitted");this.$dirty=!1;this.$pristine=!0;this.$submitted=!1;r(this.$$controls,function(a){a.$setPristine()})},$setUntouched:function(){r(this.$$controls,function(a){a.$setUntouched()})},$setSubmitted:function(){for(var a=this;a.$$parentForm&&a.$$parentForm!==mb;)a=a.$$parentForm;a.$$setSubmitted()},$$setSubmitted:function(){this.$$animate.addClass(this.$$element, 10436"ng-submitted");this.$submitted=!0;r(this.$$controls,function(a){a.$$setSubmitted&&a.$$setSubmitted()})}};ce({clazz:Qb,set:function(a,b,d){var c=a[b];c?-1===c.indexOf(d)&&c.push(d):a[b]=[d]},unset:function(a,b,d){var c=a[b];c&&(cb(c,d),0===c.length&&delete a[b])}});var oe=function(a){return["$timeout","$parse",function(b,d){function c(a){return""===a?d('this[""]').assign:d(a).assign||E}return{name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:Qb,compile:function(d,f){d.addClass(Za).addClass(nb); 10437var g=f.name?"name":a&&f.ngForm?"ngForm":!1;return{pre:function(a,d,e,f){var p=f[0];if(!("action"in e)){var n=function(b){a.$apply(function(){p.$commitViewValue();p.$setSubmitted()});b.preventDefault()};d[0].addEventListener("submit",n);d.on("$destroy",function(){b(function(){d[0].removeEventListener("submit",n)},0,!1)})}(f[1]||p.$$parentForm).$addControl(p);var s=g?c(p.$name):E;g&&(s(a,p),e.$observe(g,function(b){p.$name!==b&&(s(a,void 0),p.$$parentForm.$$renameControl(p,b),s=c(p.$name),s(a,p))})); 10438d.on("$destroy",function(){p.$$parentForm.$removeControl(p);s(a,void 0);S(p,mb)})}}}}}]},Se=oe(),df=oe(!0),mh=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,xh=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,yh=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/, 10439nh=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,pe=/^(\d{4,})-(\d{2})-(\d{2})$/,qe=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Oc=/^(\d{4,})-W(\d\d)$/,re=/^(\d{4,})-(\d\d)$/,se=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,ee=T();r(["date","datetime-local","month","time","week"],function(a){ee[a]=!0});var te={text:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Ic(c)},date:ob("date",pe,Rb(pe,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":ob("datetimelocal",qe,Rb(qe,"yyyy MM dd HH mm ss sss".split(" ")), 10440"yyyy-MM-ddTHH:mm:ss.sss"),time:ob("time",se,Rb(se,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:ob("week",Oc,function(a,b){if(ha(a))return a;if(C(a)){Oc.lastIndex=0;var d=Oc.exec(a);if(d){var c=+d[1],e=+d[2],f=d=0,g=0,k=0,h=Zd(c),e=7*(e-1);b&&(d=b.getHours(),f=b.getMinutes(),g=b.getSeconds(),k=b.getMilliseconds());return new Date(c,0,h.getDate()+e,d,f,g,k)}}return NaN},"yyyy-Www"),month:ob("month",re,Rb(re,["yyyy","MM"]),"yyyy-MM"),number:function(a,b,d,c,e,f,g,k){Jc(a,b,d,c,"number");fe(c);Sa(a, 10441b,d,c,e,f);var h;if(w(d.min)||d.ngMin){var l=d.min||k(d.ngMin)(a);h=na(l);c.$validators.min=function(a,b){return c.$isEmpty(b)||A(h)||b>=h};d.$observe("min",function(a){a!==l&&(h=na(a),l=a,c.$validate())})}if(w(d.max)||d.ngMax){var m=d.max||k(d.ngMax)(a),p=na(m);c.$validators.max=function(a,b){return c.$isEmpty(b)||A(p)||b<=p};d.$observe("max",function(a){a!==m&&(p=na(a),m=a,c.$validate())})}if(w(d.step)||d.ngStep){var n=d.step||k(d.ngStep)(a),s=na(n);c.$validators.step=function(a,b){return c.$isEmpty(b)|| 10442A(s)||ge(b,h||0,s)};d.$observe("step",function(a){a!==n&&(s=na(a),n=a,c.$validate())})}},url:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Ic(c);c.$validators.url=function(a,b){var d=a||b;return c.$isEmpty(d)||xh.test(d)}},email:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Ic(c);c.$validators.email=function(a,b){var d=a||b;return c.$isEmpty(d)||yh.test(d)}},radio:function(a,b,d,c){var e=!d.ngTrim||"false"!==V(d.ngTrim);A(d.name)&&b.attr("name",++qb);b.on("change",function(a){var g;b[0].checked&&(g=d.value,e&&(g= 10443V(g)),c.$setViewValue(g,a&&a.type))});c.$render=function(){var a=d.value;e&&(a=V(a));b[0].checked=a===c.$viewValue};d.$observe("value",c.$render)},range:function(a,b,d,c,e,f){function g(a,c){b.attr(a,d[a]);var e=d[a];d.$observe(a,function(a){a!==e&&(e=a,c(a))})}function k(a){p=na(a);Y(c.$modelValue)||(m?(a=b.val(),p>a&&(a=p,b.val(a)),c.$setViewValue(a)):c.$validate())}function h(a){n=na(a);Y(c.$modelValue)||(m?(a=b.val(),n<a&&(b.val(n),a=n<p?p:n),c.$setViewValue(a)):c.$validate())}function l(a){s= 10444na(a);Y(c.$modelValue)||(m?c.$viewValue!==b.val()&&c.$setViewValue(b.val()):c.$validate())}Jc(a,b,d,c,"range");fe(c);Sa(a,b,d,c,e,f);var m=c.$$hasNativeValidators&&"range"===b[0].type,p=m?0:void 0,n=m?100:void 0,s=m?1:void 0,r=b[0].validity;a=w(d.min);e=w(d.max);f=w(d.step);var q=c.$render;c.$render=m&&w(r.rangeUnderflow)&&w(r.rangeOverflow)?function(){q();c.$setViewValue(b.val())}:q;a&&(p=na(d.min),c.$validators.min=m?function(){return!0}:function(a,b){return c.$isEmpty(b)||A(p)||b>=p},g("min",k)); 10445e&&(n=na(d.max),c.$validators.max=m?function(){return!0}:function(a,b){return c.$isEmpty(b)||A(n)||b<=n},g("max",h));f&&(s=na(d.step),c.$validators.step=m?function(){return!r.stepMismatch}:function(a,b){return c.$isEmpty(b)||A(s)||ge(b,p||0,s)},g("step",l))},checkbox:function(a,b,d,c,e,f,g,k){var h=he(k,a,"ngTrueValue",d.ngTrueValue,!0),l=he(k,a,"ngFalseValue",d.ngFalseValue,!1);b.on("change",function(a){c.$setViewValue(b[0].checked,a&&a.type)});c.$render=function(){b[0].checked=c.$viewValue};c.$isEmpty= 10446function(a){return!1===a};c.$formatters.push(function(a){return va(a,h)});c.$parsers.push(function(a){return a?h:l})},hidden:E,button:E,submit:E,reset:E,file:E},$c=["$browser","$sniffer","$filter","$parse",function(a,b,d,c){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,k){k[0]&&(te[K(g.type)]||te.text)(e,f,g,k[0],b,a,d,c)}}}}],Af=function(){var a={configurable:!0,enumerable:!1,get:function(){return this.getAttribute("value")||""},set:function(a){this.setAttribute("value",a)}}; 10447return{restrict:"E",priority:200,compile:function(b,d){if("hidden"===K(d.type))return{pre:function(b,d,f,g){b=d[0];b.parentNode&&b.parentNode.insertBefore(b,b.nextSibling);Object.defineProperty&&Object.defineProperty(b,"value",a)}}}}},zh=/^(true|false|\d+)$/,xf=function(){function a(a,d,c){var e=w(c)?c:9===wa?"":null;a.prop("value",e);d.$set("value",c)}return{restrict:"A",priority:100,compile:function(b,d){return zh.test(d.ngValue)?function(b,d,f){b=b.$eval(f.ngValue);a(d,f,b)}:function(b,d,f){b.$watch(f.ngValue, 10448function(b){a(d,f,b)})}}}},We=["$compile",function(a){return{restrict:"AC",compile:function(b){a.$$addBindingClass(b);return function(b,c,e){a.$$addBindingInfo(c,e.ngBind);c=c[0];b.$watch(e.ngBind,function(a){c.textContent=jc(a)})}}}}],Ye=["$interpolate","$compile",function(a,b){return{compile:function(d){b.$$addBindingClass(d);return function(c,d,f){c=a(d.attr(f.$attr.ngBindTemplate));b.$$addBindingInfo(d,c.expressions);d=d[0];f.$observe("ngBindTemplate",function(a){d.textContent=A(a)?"":a})}}}}], 10449Xe=["$sce","$parse","$compile",function(a,b,d){return{restrict:"A",compile:function(c,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(b){return a.valueOf(b)});d.$$addBindingClass(c);return function(b,c,e){d.$$addBindingInfo(c,e.ngBindHtml);b.$watch(g,function(){var d=f(b);c.html(a.getTrustedHtml(d)||"")})}}}}],wf=ia({restrict:"A",require:"ngModel",link:function(a,b,d,c){c.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),Ze=Lc("",!0),af=Lc("Odd",0),$e=Lc("Even",1),bf=Ra({compile:function(a, 10450b){b.$set("ngCloak",void 0);a.removeClass("ng-cloak")}}),cf=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],ed={},Ah={blur:!0,focus:!0};r("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var b=xa("ng-"+a);ed[b]=["$parse","$rootScope","$exceptionHandler",function(d,c,e){return sd(d,c,e,b,a,Ah[a])}]});var ff=["$animate","$compile",function(a,b){return{multiElement:!0, 10451transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(d,c,e,f,g){var k,h,l;d.$watch(e.ngIf,function(d){d?h||g(function(d,f){h=f;d[d.length++]=b.$$createComment("end ngIf",e.ngIf);k={clone:d};a.enter(d,c.parent(),c)}):(l&&(l.remove(),l=null),h&&(h.$destroy(),h=null),k&&(l=ub(k.clone),a.leave(l).done(function(a){!1!==a&&(l=null)}),k=null))})}}}],gf=["$templateRequest","$anchorScroll","$animate",function(a,b,d){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element", 10452controller:ca.noop,compile:function(c,e){var f=e.ngInclude||e.src,g=e.onload||"",k=e.autoscroll;return function(c,e,m,p,n){var r=0,q,t,x,v=function(){t&&(t.remove(),t=null);q&&(q.$destroy(),q=null);x&&(d.leave(x).done(function(a){!1!==a&&(t=null)}),t=x,x=null)};c.$watch(f,function(f){var m=function(a){!1===a||!w(k)||k&&!c.$eval(k)||b()},t=++r;f?(a(f,!0).then(function(a){if(!c.$$destroyed&&t===r){var b=c.$new();p.template=a;a=n(b,function(a){v();d.enter(a,null,e).done(m)});q=b;x=a;q.$emit("$includeContentLoaded", 10453f);c.$eval(g)}},function(){c.$$destroyed||t!==r||(v(),c.$emit("$includeContentError",f))}),c.$emit("$includeContentRequested",f)):(v(),p.template=null)})}}}}],zf=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(b,d,c,e){la.call(d[0]).match(/SVG/)?(d.empty(),a(gd(e.template,z.document).childNodes)(b,function(a){d.append(a)},{futureParentElement:d})):(d.html(e.template),a(d.contents())(b))}}}],hf=Ra({priority:450,compile:function(){return{pre:function(a, 10454b,d){a.$eval(d.ngInit)}}}}),vf=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,d,c){var e=d.ngList||", ",f="false"!==d.ngTrim,g=f?V(e):e;c.$parsers.push(function(a){if(!A(a)){var b=[];a&&r(a.split(g),function(a){a&&b.push(f?V(a):a)});return b}});c.$formatters.push(function(a){if(H(a))return a.join(e)});c.$isEmpty=function(a){return!a||!a.length}}}},nb="ng-valid",be="ng-invalid",Za="ng-pristine",Wb="ng-dirty",pb=F("ngModel");Sb.$inject="$scope $exceptionHandler $attrs $element $parse $animate $timeout $q $interpolate".split(" "); 10455Sb.prototype={$$initGetterSetters:function(){if(this.$options.getOption("getterSetter")){var a=this.$$parse(this.$$attr.ngModel+"()"),b=this.$$parse(this.$$attr.ngModel+"($$$p)");this.$$ngModelGet=function(b){var c=this.$$parsedNgModel(b);B(c)&&(c=a(b));return c};this.$$ngModelSet=function(a,c){B(this.$$parsedNgModel(a))?b(a,{$$$p:c}):this.$$parsedNgModelAssign(a,c)}}else if(!this.$$parsedNgModel.assign)throw pb("nonassign",this.$$attr.ngModel,Aa(this.$$element));},$render:E,$isEmpty:function(a){return A(a)|| 10456""===a||null===a||a!==a},$$updateEmptyClasses:function(a){this.$isEmpty(a)?(this.$$animate.removeClass(this.$$element,"ng-not-empty"),this.$$animate.addClass(this.$$element,"ng-empty")):(this.$$animate.removeClass(this.$$element,"ng-empty"),this.$$animate.addClass(this.$$element,"ng-not-empty"))},$setPristine:function(){this.$dirty=!1;this.$pristine=!0;this.$$animate.removeClass(this.$$element,Wb);this.$$animate.addClass(this.$$element,Za)},$setDirty:function(){this.$dirty=!0;this.$pristine=!1;this.$$animate.removeClass(this.$$element, 10457Za);this.$$animate.addClass(this.$$element,Wb);this.$$parentForm.$setDirty()},$setUntouched:function(){this.$touched=!1;this.$untouched=!0;this.$$animate.setClass(this.$$element,"ng-untouched","ng-touched")},$setTouched:function(){this.$touched=!0;this.$untouched=!1;this.$$animate.setClass(this.$$element,"ng-touched","ng-untouched")},$rollbackViewValue:function(){this.$$timeout.cancel(this.$$pendingDebounce);this.$viewValue=this.$$lastCommittedViewValue;this.$render()},$validate:function(){if(!Y(this.$modelValue)){var a= 10458this.$$lastCommittedViewValue,b=this.$$rawModelValue,d=this.$valid,c=this.$modelValue,e=this.$options.getOption("allowInvalid"),f=this;this.$$runValidators(b,a,function(a){e||d===a||(f.$modelValue=a?b:void 0,f.$modelValue!==c&&f.$$writeModelToScope())})}},$$runValidators:function(a,b,d){function c(){var c=!0;r(h.$validators,function(d,e){var g=Boolean(d(a,b));c=c&&g;f(e,g)});return c?!0:(r(h.$asyncValidators,function(a,b){f(b,null)}),!1)}function e(){var c=[],d=!0;r(h.$asyncValidators,function(e, 10459g){var h=e(a,b);if(!h||!B(h.then))throw pb("nopromise",h);f(g,void 0);c.push(h.then(function(){f(g,!0)},function(){d=!1;f(g,!1)}))});c.length?h.$$q.all(c).then(function(){g(d)},E):g(!0)}function f(a,b){k===h.$$currentValidationRunId&&h.$setValidity(a,b)}function g(a){k===h.$$currentValidationRunId&&d(a)}this.$$currentValidationRunId++;var k=this.$$currentValidationRunId,h=this;(function(){var a=h.$$parserName;if(A(h.$$parserValid))f(a,null);else return h.$$parserValid||(r(h.$validators,function(a, 10460b){f(b,null)}),r(h.$asyncValidators,function(a,b){f(b,null)})),f(a,h.$$parserValid),h.$$parserValid;return!0})()?c()?e():g(!1):g(!1)},$commitViewValue:function(){var a=this.$viewValue;this.$$timeout.cancel(this.$$pendingDebounce);if(this.$$lastCommittedViewValue!==a||""===a&&this.$$hasNativeValidators)this.$$updateEmptyClasses(a),this.$$lastCommittedViewValue=a,this.$pristine&&this.$setDirty(),this.$$parseAndValidate()},$$parseAndValidate:function(){var a=this.$$lastCommittedViewValue,b=this;this.$$parserValid= 10461A(a)?void 0:!0;this.$setValidity(this.$$parserName,null);this.$$parserName="parse";if(this.$$parserValid)for(var d=0;d<this.$parsers.length;d++)if(a=this.$parsers[d](a),A(a)){this.$$parserValid=!1;break}Y(this.$modelValue)&&(this.$modelValue=this.$$ngModelGet(this.$$scope));var c=this.$modelValue,e=this.$options.getOption("allowInvalid");this.$$rawModelValue=a;e&&(this.$modelValue=a,b.$modelValue!==c&&b.$$writeModelToScope());this.$$runValidators(a,this.$$lastCommittedViewValue,function(d){e||(b.$modelValue= 10462d?a:void 0,b.$modelValue!==c&&b.$$writeModelToScope())})},$$writeModelToScope:function(){this.$$ngModelSet(this.$$scope,this.$modelValue);r(this.$viewChangeListeners,function(a){try{a()}catch(b){this.$$exceptionHandler(b)}},this)},$setViewValue:function(a,b){this.$viewValue=a;this.$options.getOption("updateOnDefault")&&this.$$debounceViewValueCommit(b)},$$debounceViewValueCommit:function(a){var b=this.$options.getOption("debounce");X(b[a])?b=b[a]:X(b["default"])&&-1===this.$options.getOption("updateOn").indexOf(a)? 10463b=b["default"]:X(b["*"])&&(b=b["*"]);this.$$timeout.cancel(this.$$pendingDebounce);var d=this;0<b?this.$$pendingDebounce=this.$$timeout(function(){d.$commitViewValue()},b):this.$$rootScope.$$phase?this.$commitViewValue():this.$$scope.$apply(function(){d.$commitViewValue()})},$overrideModelOptions:function(a){this.$options=this.$options.createChild(a);this.$$setUpdateOnEvents()},$processModelValue:function(){var a=this.$$format();this.$viewValue!==a&&(this.$$updateEmptyClasses(a),this.$viewValue=this.$$lastCommittedViewValue= 10464a,this.$render(),this.$$runValidators(this.$modelValue,this.$viewValue,E))},$$format:function(){for(var a=this.$formatters,b=a.length,d=this.$modelValue;b--;)d=a[b](d);return d},$$setModelValue:function(a){this.$modelValue=this.$$rawModelValue=a;this.$$parserValid=void 0;this.$processModelValue()},$$setUpdateOnEvents:function(){this.$$updateEvents&&this.$$element.off(this.$$updateEvents,this.$$updateEventHandler);if(this.$$updateEvents=this.$options.getOption("updateOn"))this.$$element.on(this.$$updateEvents, 10465this.$$updateEventHandler)},$$updateEventHandler:function(a){this.$$debounceViewValueCommit(a&&a.type)}};ce({clazz:Sb,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]}});var uf=["$rootScope",function(a){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:Sb,priority:1,compile:function(b){b.addClass(Za).addClass("ng-untouched").addClass(nb);return{pre:function(a,b,e,f){var g=f[0];b=f[1]||g.$$parentForm;if(f=f[2])g.$options=f.$options;g.$$initGetterSetters();b.$addControl(g); 10466e.$observe("name",function(a){g.$name!==a&&g.$$parentForm.$$renameControl(g,a)});a.$on("$destroy",function(){g.$$parentForm.$removeControl(g)})},post:function(b,c,e,f){function g(){k.$setTouched()}var k=f[0];k.$$setUpdateOnEvents();c.on("blur",function(){k.$touched||(a.$$phase?b.$evalAsync(g):b.$apply(g))})}}}}}],Tb,Bh=/(\s+|^)default(\s+|$)/;Mc.prototype={getOption:function(a){return this.$$options[a]},createChild:function(a){var b=!1;a=S({},a);r(a,function(d,c){"$inherit"===d?"*"===c?b=!0:(a[c]= 10467this.$$options[c],"updateOn"===c&&(a.updateOnDefault=this.$$options.updateOnDefault)):"updateOn"===c&&(a.updateOnDefault=!1,a[c]=V(d.replace(Bh,function(){a.updateOnDefault=!0;return" "})))},this);b&&(delete a["*"],ie(a,this.$$options));ie(a,Tb.$$options);return new Mc(a)}};Tb=new Mc({updateOn:"",updateOnDefault:!0,debounce:0,getterSetter:!1,allowInvalid:!1,timezone:null});var yf=function(){function a(a,d){this.$$attrs=a;this.$$scope=d}a.$inject=["$attrs","$scope"];a.prototype={$onInit:function(){var a= 10468this.parentCtrl?this.parentCtrl.$options:Tb,d=this.$$scope.$eval(this.$$attrs.ngModelOptions);this.$options=a.createChild(d)}};return{restrict:"A",priority:10,require:{parentCtrl:"?^^ngModelOptions"},bindToController:!0,controller:a}},jf=Ra({terminal:!0,priority:1E3}),Ch=F("ngOptions"),Dh=/^\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]+?))?$/, 10469sf=["$compile","$document","$parse",function(a,b,d){function c(a,b,c){function e(a,b,c,d,f){this.selectValue=a;this.viewValue=b;this.label=c;this.group=d;this.disabled=f}function f(a){var b;if(!r&&za(a))b=a;else{b=[];for(var c in a)a.hasOwnProperty(c)&&"$"!==c.charAt(0)&&b.push(c)}return b}var p=a.match(Dh);if(!p)throw Ch("iexp",a,Aa(b));var n=p[5]||p[7],r=p[6];a=/ as /.test(p[0])&&p[1];var q=p[9];b=d(p[2]?p[1]:n);var t=a&&d(a)||b,w=q&&d(q),v=q?function(a,b){return w(c,b)}:function(a){return La(a)}, 10470x=function(a,b){return v(a,B(a,b))},A=d(p[2]||p[1]),y=d(p[3]||""),J=d(p[4]||""),I=d(p[8]),z={},B=r?function(a,b){z[r]=b;z[n]=a;return z}:function(a){z[n]=a;return z};return{trackBy:q,getTrackByValue:x,getWatchables:d(I,function(a){var b=[];a=a||[];for(var d=f(a),e=d.length,g=0;g<e;g++){var k=a===d?g:d[g],l=a[k],k=B(l,k),l=v(l,k);b.push(l);if(p[2]||p[1])l=A(c,k),b.push(l);p[4]&&(k=J(c,k),b.push(k))}return b}),getOptions:function(){for(var a=[],b={},d=I(c)||[],g=f(d),k=g.length,n=0;n<k;n++){var p=d=== 10471g?n:g[n],r=B(d[p],p),s=t(c,r),p=v(s,r),w=A(c,r),z=y(c,r),r=J(c,r),s=new e(p,s,w,z,r);a.push(s);b[p]=s}return{items:a,selectValueMap:b,getOptionFromViewValue:function(a){return b[x(a)]},getViewValueFromOption:function(a){return q?Ia(a.viewValue):a.viewValue}}}}}var e=z.document.createElement("option"),f=z.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(a,b,c,d){d[0].registerOption=E},post:function(d,k,h,l){function m(a){var b=(a=v.getOptionFromViewValue(a))&& 10472a.element;b&&!b.selected&&(b.selected=!0);return a}function p(a,b){a.element=b;b.disabled=a.disabled;a.label!==b.label&&(b.label=a.label,b.textContent=a.label);b.value=a.selectValue}var n=l[0],q=l[1],A=h.multiple;l=0;for(var t=k.children(),z=t.length;l<z;l++)if(""===t[l].value){n.hasEmptyOption=!0;n.emptyOption=t.eq(l);break}k.empty();l=!!n.emptyOption;x(e.cloneNode(!1)).val("?");var v,B=c(h.ngOptions,k,d),C=b[0].createDocumentFragment();n.generateUnknownOptionValue=function(a){return"?"};A?(n.writeValue= 10473function(a){if(v){var b=a&&a.map(m)||[];v.items.forEach(function(a){a.element.selected&&-1===Array.prototype.indexOf.call(b,a)&&(a.element.selected=!1)})}},n.readValue=function(){var a=k.val()||[],b=[];r(a,function(a){(a=v.selectValueMap[a])&&!a.disabled&&b.push(v.getViewValueFromOption(a))});return b},B.trackBy&&d.$watchCollection(function(){if(H(q.$viewValue))return q.$viewValue.map(function(a){return B.getTrackByValue(a)})},function(){q.$render()})):(n.writeValue=function(a){if(v){var b=k[0].options[k[0].selectedIndex], 10474c=v.getOptionFromViewValue(a);b&&b.removeAttribute("selected");c?(k[0].value!==c.selectValue&&(n.removeUnknownOption(),k[0].value=c.selectValue,c.element.selected=!0),c.element.setAttribute("selected","selected")):n.selectUnknownOrEmptyOption(a)}},n.readValue=function(){var a=v.selectValueMap[k.val()];return a&&!a.disabled?(n.unselectEmptyOption(),n.removeUnknownOption(),v.getViewValueFromOption(a)):null},B.trackBy&&d.$watch(function(){return B.getTrackByValue(q.$viewValue)},function(){q.$render()})); 10475l&&(a(n.emptyOption)(d),k.prepend(n.emptyOption),8===n.emptyOption[0].nodeType?(n.hasEmptyOption=!1,n.registerOption=function(a,b){""===b.val()&&(n.hasEmptyOption=!0,n.emptyOption=b,n.emptyOption.removeClass("ng-scope"),q.$render(),b.on("$destroy",function(){var a=n.$isEmptyOptionSelected();n.hasEmptyOption=!1;n.emptyOption=void 0;a&&q.$render()}))}):n.emptyOption.removeClass("ng-scope"));d.$watchCollection(B.getWatchables,function(){var a=v&&n.readValue();if(v)for(var b=v.items.length-1;0<=b;b--){var c= 10476v.items[b];w(c.group)?Gb(c.element.parentNode):Gb(c.element)}v=B.getOptions();var d={};v.items.forEach(function(a){var b;if(w(a.group)){b=d[a.group];b||(b=f.cloneNode(!1),C.appendChild(b),b.label=null===a.group?"null":a.group,d[a.group]=b);var c=e.cloneNode(!1);b.appendChild(c);p(a,c)}else b=e.cloneNode(!1),C.appendChild(b),p(a,b)});k[0].appendChild(C);q.$render();q.$isEmpty(a)||(b=n.readValue(),(B.trackBy||A?va(a,b):a===b)||(q.$setViewValue(b),q.$render()))})}}}}],kf=["$locale","$interpolate","$log", 10477function(a,b,d){var c=/{}/g,e=/^when(Minus)?(.+)$/;return{link:function(f,g,k){function h(a){g.text(a||"")}var l=k.count,m=k.$attr.when&&g.attr(k.$attr.when),p=k.offset||0,n=f.$eval(m)||{},q={},w=b.startSymbol(),t=b.endSymbol(),x=w+l+"-"+p+t,v=ca.noop,z;r(k,function(a,b){var c=e.exec(b);c&&(c=(c[1]?"-":"")+K(c[2]),n[c]=g.attr(k.$attr[b]))});r(n,function(a,d){q[d]=b(a.replace(c,x))});f.$watch(l,function(b){var c=parseFloat(b),e=Y(c);e||c in n||(c=a.pluralCat(c-p));c===z||e&&Y(z)||(v(),e=q[c],A(e)? 10478(null!=b&&d.debug("ngPluralize: no rule defined for '"+c+"' in "+m),v=E,h()):v=f.$watch(e,h),z=c)})}}}],ue=F("ngRef"),lf=["$parse",function(a){return{priority:-1,restrict:"A",compile:function(b,d){var c=xa(ua(b)),e=a(d.ngRef),f=e.assign||function(){throw ue("nonassign",d.ngRef);};return function(a,b,h){var l;if(h.hasOwnProperty("ngRefRead"))if("$element"===h.ngRefRead)l=b;else{if(l=b.data("$"+h.ngRefRead+"Controller"),!l)throw ue("noctrl",h.ngRefRead,d.ngRef);}else l=b.data("$"+c+"Controller");l= 10479l||b;f(a,l);b.on("$destroy",function(){e(a)===l&&f(a,null)})}}}}],mf=["$parse","$animate","$compile",function(a,b,d){var c=F("ngRepeat"),e=function(a,b,c,d,e,f,g){a[c]=d;e&&(a[e]=f);a.$index=b;a.$first=0===b;a.$last=b===g-1;a.$middle=!(a.$first||a.$last);a.$odd=!(a.$even=0===(b&1))},f=function(a,b,c){return La(c)},g=function(a,b){return b};return{restrict:"A",multiElement:!0,transclude:"element",priority:1E3,terminal:!0,$$tlb:!0,compile:function(k,h){var l=h.ngRepeat,m=d.$$createComment("end ngRepeat", 10480l),p=l.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!p)throw c("iexp",l);var n=p[1],q=p[2],w=p[3],t=p[4],p=n.match(/^(?:(\s*[$\w]+)|\(\s*([$\w]+)\s*,\s*([$\w]+)\s*\))$/);if(!p)throw c("iidexp",n);var x=p[3]||p[1],v=p[2];if(w&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(w)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(w)))throw c("badident",w);var A;if(t){var z={$id:La},y=a(t);A=function(a,b,c,d){v&& 10481(z[v]=b);z[x]=c;z.$index=d;return y(a,z)}}return function(a,d,h,k,n){var p=T();a.$watchCollection(q,function(h){var k,q,t=d[0],s,y=T(),B,C,E,D,H,F,K;w&&(a[w]=h);if(za(h))H=h,q=A||f;else for(K in q=A||g,H=[],h)ta.call(h,K)&&"$"!==K.charAt(0)&&H.push(K);B=H.length;K=Array(B);for(k=0;k<B;k++)if(C=h===H?k:H[k],E=h[C],D=q(a,C,E,k),p[D])F=p[D],delete p[D],y[D]=F,K[k]=F;else{if(y[D])throw r(K,function(a){a&&a.scope&&(p[a.id]=a)}),c("dupes",l,D,E);K[k]={id:D,scope:void 0,clone:void 0};y[D]=!0}z&&(z[x]=void 0); 10482for(s in p){F=p[s];D=ub(F.clone);b.leave(D);if(D[0].parentNode)for(k=0,q=D.length;k<q;k++)D[k].$$NG_REMOVED=!0;F.scope.$destroy()}for(k=0;k<B;k++)if(C=h===H?k:H[k],E=h[C],F=K[k],F.scope){s=t;do s=s.nextSibling;while(s&&s.$$NG_REMOVED);F.clone[0]!==s&&b.move(ub(F.clone),null,t);t=F.clone[F.clone.length-1];e(F.scope,k,x,E,v,C,B)}else n(function(a,c){F.scope=c;var d=m.cloneNode(!1);a[a.length++]=d;b.enter(a,null,t);t=d;F.clone=a;y[F.id]=F;e(F.scope,k,x,E,v,C,B)});p=y})}}}}],nf=["$animate",function(a){return{restrict:"A", 10483multiElement:!0,link:function(b,d,c){b.$watch(c.ngShow,function(b){a[b?"removeClass":"addClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],ef=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,d,c){b.$watch(c.ngHide,function(b){a[b?"addClass":"removeClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],of=Ra(function(a,b,d){a.$watchCollection(d.ngStyle,function(a,d){d&&a!==d&&r(d,function(a,c){b.css(c,"")});a&&b.css(a)})}),pf=["$animate","$compile",function(a, 10484b){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(d,c,e,f){var g=[],k=[],h=[],l=[],m=function(a,b){return function(c){!1!==c&&a.splice(b,1)}};d.$watch(e.ngSwitch||e.on,function(c){for(var d,e;h.length;)a.cancel(h.pop());d=0;for(e=l.length;d<e;++d){var q=ub(k[d].clone);l[d].$destroy();(h[d]=a.leave(q)).done(m(h,d))}k.length=0;l.length=0;(g=f.cases["!"+c]||f.cases["?"])&&r(g,function(c){c.transclude(function(d,e){l.push(e);var f=c.element;d[d.length++]=b.$$createComment("end ngSwitchWhen"); 10485k.push({clone:d});a.enter(d,f.parent(),f)})})})}}}],qf=Ra({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,e){a=d.ngSwitchWhen.split(d.ngSwitchWhenSeparator).sort().filter(function(a,b,c){return c[b-1]!==a});r(a,function(a){c.cases["!"+a]=c.cases["!"+a]||[];c.cases["!"+a].push({transclude:e,element:b})})}}),rf=Ra({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,e){c.cases["?"]=c.cases["?"]||[];c.cases["?"].push({transclude:e, 10486element:b})}}),Eh=F("ngTransclude"),tf=["$compile",function(a){return{restrict:"EAC",compile:function(b){var d=a(b.contents());b.empty();return function(a,b,f,g,k){function h(){d(a,function(a){b.append(a)})}if(!k)throw Eh("orphan",Aa(b));f.ngTransclude===f.$attr.ngTransclude&&(f.ngTransclude="");f=f.ngTransclude||f.ngTranscludeSlot;k(function(a,c){var d;if(d=a.length)a:{d=0;for(var f=a.length;d<f;d++){var g=a[d];if(g.nodeType!==Pa||g.nodeValue.trim()){d=!0;break a}}d=void 0}d?b.append(a):(h(),c.$destroy())}, 10487null,f);f&&!k.isSlotFilled(f)&&h()}}}}],Te=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(b,d){"text/ng-template"===d.type&&a.put(d.id,b[0].text)}}}],Fh={$setViewValue:E,$render:E},Gh=["$element","$scope",function(a,b){function d(){g||(g=!0,b.$$postDigest(function(){g=!1;e.ngModelCtrl.$render()}))}function c(a){k||(k=!0,b.$$postDigest(function(){b.$$destroyed||(k=!1,e.ngModelCtrl.$setViewValue(e.readValue()),a&&e.ngModelCtrl.$render())}))}var e=this,f=new Ib;e.selectValueMap= 10488{};e.ngModelCtrl=Fh;e.multiple=!1;e.unknownOption=x(z.document.createElement("option"));e.hasEmptyOption=!1;e.emptyOption=void 0;e.renderUnknownOption=function(b){b=e.generateUnknownOptionValue(b);e.unknownOption.val(b);a.prepend(e.unknownOption);Oa(e.unknownOption,!0);a.val(b)};e.updateUnknownOption=function(b){b=e.generateUnknownOptionValue(b);e.unknownOption.val(b);Oa(e.unknownOption,!0);a.val(b)};e.generateUnknownOptionValue=function(a){return"? "+La(a)+" ?"};e.removeUnknownOption=function(){e.unknownOption.parent()&& 10489e.unknownOption.remove()};e.selectEmptyOption=function(){e.emptyOption&&(a.val(""),Oa(e.emptyOption,!0))};e.unselectEmptyOption=function(){e.hasEmptyOption&&Oa(e.emptyOption,!1)};b.$on("$destroy",function(){e.renderUnknownOption=E});e.readValue=function(){var b=a.val(),b=b in e.selectValueMap?e.selectValueMap[b]:b;return e.hasOption(b)?b:null};e.writeValue=function(b){var c=a[0].options[a[0].selectedIndex];c&&Oa(x(c),!1);e.hasOption(b)?(e.removeUnknownOption(),c=La(b),a.val(c in e.selectValueMap? 10490c:b),Oa(x(a[0].options[a[0].selectedIndex]),!0)):e.selectUnknownOrEmptyOption(b)};e.addOption=function(a,b){if(8!==b[0].nodeType){Ja(a,'"option value"');""===a&&(e.hasEmptyOption=!0,e.emptyOption=b);var c=f.get(a)||0;f.set(a,c+1);d()}};e.removeOption=function(a){var b=f.get(a);b&&(1===b?(f.delete(a),""===a&&(e.hasEmptyOption=!1,e.emptyOption=void 0)):f.set(a,b-1))};e.hasOption=function(a){return!!f.get(a)};e.$hasEmptyOption=function(){return e.hasEmptyOption};e.$isUnknownOptionSelected=function(){return a[0].options[0]=== 10491e.unknownOption[0]};e.$isEmptyOptionSelected=function(){return e.hasEmptyOption&&a[0].options[a[0].selectedIndex]===e.emptyOption[0]};e.selectUnknownOrEmptyOption=function(a){null==a&&e.emptyOption?(e.removeUnknownOption(),e.selectEmptyOption()):e.unknownOption.parent().length?e.updateUnknownOption(a):e.renderUnknownOption(a)};var g=!1,k=!1;e.registerOption=function(a,b,f,g,k){if(f.$attr.ngValue){var q,r;f.$observe("value",function(a){var d,f=b.prop("selected");w(r)&&(e.removeOption(q),delete e.selectValueMap[r], 10492d=!0);r=La(a);q=a;e.selectValueMap[r]=a;e.addOption(a,b);b.attr("value",r);d&&f&&c()})}else g?f.$observe("value",function(a){e.readValue();var d,f=b.prop("selected");w(q)&&(e.removeOption(q),d=!0);q=a;e.addOption(a,b);d&&f&&c()}):k?a.$watch(k,function(a,d){f.$set("value",a);var g=b.prop("selected");d!==a&&e.removeOption(d);e.addOption(a,b);d&&g&&c()}):e.addOption(f.value,b);f.$observe("disabled",function(a){if("true"===a||a&&b.prop("selected"))e.multiple?c(!0):(e.ngModelCtrl.$setViewValue(null),e.ngModelCtrl.$render())}); 10493b.on("$destroy",function(){var a=e.readValue(),b=f.value;e.removeOption(b);d();(e.multiple&&a&&-1!==a.indexOf(b)||a===b)&&c(!0)})}}],Ue=function(){return{restrict:"E",require:["select","?ngModel"],controller:Gh,priority:1,link:{pre:function(a,b,d,c){var e=c[0],f=c[1];if(f){if(e.ngModelCtrl=f,b.on("change",function(){e.removeUnknownOption();a.$apply(function(){f.$setViewValue(e.readValue())})}),d.multiple){e.multiple=!0;e.readValue=function(){var a=[];r(b.find("option"),function(b){b.selected&&!b.disabled&& 10494(b=b.value,a.push(b in e.selectValueMap?e.selectValueMap[b]:b))});return a};e.writeValue=function(a){r(b.find("option"),function(b){var c=!!a&&(-1!==Array.prototype.indexOf.call(a,b.value)||-1!==Array.prototype.indexOf.call(a,e.selectValueMap[b.value]));c!==b.selected&&Oa(x(b),c)})};var g,k=NaN;a.$watch(function(){k!==f.$viewValue||va(g,f.$viewValue)||(g=ja(f.$viewValue),f.$render());k=f.$viewValue});f.$isEmpty=function(a){return!a||0===a.length}}}else e.registerOption=E},post:function(a,b,d,c){var e= 10495c[1];if(e){var f=c[0];e.$render=function(){f.writeValue(e.$viewValue)}}}}}},Ve=["$interpolate",function(a){return{restrict:"E",priority:100,compile:function(b,d){var c,e;w(d.ngValue)||(w(d.value)?c=a(d.value,!0):(e=a(b.text(),!0))||d.$set("value",b.text()));return function(a,b,d){var h=b.parent();(h=h.data("$selectController")||h.parent().data("$selectController"))&&h.registerOption(a,b,d,c,e)}}}}],bd=["$parse",function(a){return{restrict:"A",require:"?ngModel",link:function(b,d,c,e){if(e){var f= 10496c.hasOwnProperty("required")||a(c.ngRequired)(b);c.ngRequired||(c.required=!0);e.$validators.required=function(a,b){return!f||!e.$isEmpty(b)};c.$observe("required",function(a){f!==a&&(f=a,e.$validate())})}}}}],ad=["$parse",function(a){return{restrict:"A",require:"?ngModel",compile:function(b,d){var c,e;d.ngPattern&&(c=d.ngPattern,e="/"===d.ngPattern.charAt(0)&&ke.test(d.ngPattern)?function(){return d.ngPattern}:a(d.ngPattern));return function(a,b,d,h){if(h){var l=d.pattern;d.ngPattern?l=e(a):c=d.pattern; 10497var m=je(l,c,b);d.$observe("pattern",function(a){var d=m;m=je(a,c,b);(d&&d.toString())!==(m&&m.toString())&&h.$validate()});h.$validators.pattern=function(a,b){return h.$isEmpty(b)||A(m)||m.test(b)}}}}}}],dd=["$parse",function(a){return{restrict:"A",require:"?ngModel",link:function(b,d,c,e){if(e){var f=c.maxlength||a(c.ngMaxlength)(b),g=Ub(f);c.$observe("maxlength",function(a){f!==a&&(g=Ub(a),f=a,e.$validate())});e.$validators.maxlength=function(a,b){return 0>g||e.$isEmpty(b)||b.length<=g}}}}}],cd= 10498["$parse",function(a){return{restrict:"A",require:"?ngModel",link:function(b,d,c,e){if(e){var f=c.minlength||a(c.ngMinlength)(b),g=Ub(f)||-1;c.$observe("minlength",function(a){f!==a&&(g=Ub(a)||-1,f=a,e.$validate())});e.$validators.minlength=function(a,b){return e.$isEmpty(b)||b.length>=g}}}}}];z.angular.bootstrap?z.console&&console.log("WARNING: Tried to load AngularJS more than once."):(Je(),Oe(ca),ca.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1== 10499b?0:a.length-b-1}a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:"January February March April May June July August September October November December".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),STANDALONEMONTH:"January February March April May June July August September October November December".split(" "), 10500WEEKENDRANGE:[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:"-\u00a4",negSuf:"",posPre:"\u00a4",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(a, 10501c){var e=a|0,f=c;void 0===f&&(f=Math.min(b(a),3));Math.pow(10,f);return 1==e&&0==f?"one":"other"}})}]),x(function(){Ee(z.document,Wc)}))})(window);!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend(window.angular.element("<style>").text('@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}')); 10502//# sourceMappingURL=angular.min.js.map
10503; 10504/*! 10505 * AngularJS Material Design 10506 * https://github.com/angular/material 10507 * @license MIT 10508 * v1.1.12 10509 */ 10510!function(B,de,se){"use strict";de.module("ngMaterial",["ng","ngAnimate","ngAria","material.core","material.core.gestures","material.core.interaction","material.core.layout","material.core.meta","material.core.theming.palette","material.core.theming","material.core.animate","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.menuBar","material.components.menu","material.components.navBar","material.components.panel","material.components.progressCircular","material.components.radioButton","material.components.progressLinear","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(){function e(e,t){if(t.has("$swipe")){e.warn("You are using the ngTouch module. \nAngularJS Material already has mobile click, tap, and swipe support... \nngTouch is not supported with AngularJS Material!")}}function t(e,t){e.decorator("$$rAF",["$delegate",n]),e.decorator("$q",["$delegate",o]),t.theme("default").primaryPalette("indigo").accentPalette("pink").warnPalette("deep-orange").backgroundPalette("grey")}function n(r){return r.throttle=function(e){var t,n,o,i;return function(){t=arguments,i=this,o=e,n||(n=!0,r(function(){o.apply(i,Array.prototype.slice.call(t)),n=!1}))}},r}function o(e){return e.resolve||(e.resolve=e.when),e}e.$inject=["$log","$injector"],t.$inject=["$provide","$mdThemingProvider"],n.$inject=["$delegate"],o.$inject=["$delegate"],de.module("material.core",["ngAnimate","material.core.animate","material.core.layout","material.core.interaction","material.core.gestures","material.core.theming"]).config(t).run(e)}(),function(){function e(r){return{restrict:"A",link:{pre:function(e,t,n){var o=n.mdAutoFocus||n.mdAutofocus||n.mdSidenavFocus;i(r(o)(e)),o&&e.$watch(o,i);function i(e){de.isUndefined(e)&&(e=!0),t.toggleClass("md-autofocus",!!e)}}}}}e.$inject=["$parse"],de.module("material.core").directive("mdAutofocus",e).directive("mdAutoFocus",e).directive("mdSidenavFocus",e)}(),de.module("material.core").factory("$mdColorUtil",function(){return{rgbaToHex:function(e){return((e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):"").toUpperCase()},hexToRgba:function(e){var t="#"===e[0]?e.substr(1):e,n=t.length/3,o=t.substr(0,n),i=t.substr(n,n),r=t.substr(2*n);return 1===n&&(o+=o,i+=i,r+=r),"rgba("+parseInt(o,16)+","+parseInt(i,16)+","+parseInt(r,16)+",0.1)"},rgbToRgba:function(e){return e.replace(")",", 0.1)").replace("(","a(")},rgbaToRgb:function(e){return e?e.replace("rgba","rgb").replace(/,[^),]+\)/,")"):"rgb(0,0,0)"}}}),de.module("material.core").factory("$mdConstant",function(){var i=document.createElement("div"),r=function(e){var t,n,o=/^(Moz|webkit|ms)(?=[A-Z])/;for(t in e.style)if(n=o.exec(t))return n[0]}(i),e=/webkit/i.test(r),a=/([:\-_]+(.))/g;function t(e){var t=r+"-"+e,n=t.replace(a,function(e,t,n,o){return o?n.toUpperCase():n}),o=n.charAt(0).toLowerCase()+n.substring(1);return d(i,e)?e:d(i,n)?n:d(i,o)?o:e}function d(e,t){return de.isDefined(e.style[t])}
10510var o={isInputKey:function(e){return 31<=e.keyCode&&e.keyCode<=90},isNumPadKey:function(e){return 3===e.location&&97<=e.keyCode&&e.keyCode<=105},isMetaKey:function(e){return 91<=e.keyCode&&e.keyCode<=93},isFnLockKey:function(e){return 112<=e.keyCode&&e.keyCode<=145},isNavigationKey:function(e){var t=o.KEY_CODE,n=[t.SPACE,t.ENTER,t.UP_ARROW,t.DOWN_ARROW];return-1!=n.indexOf(e.keyCode)},hasModifierKey:function(e){return e.ctrlKey||e.metaKey||e.altKey},ELEMENT_MAX_PIXELS:1533917,BEFORE_NG_ARIA:210,KEY_CODE:{COMMA:188,SEMICOLON:186,ENTE
vendor: 4,299 bytes, line 10510
10510R: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},CSS:{TRANSITIONEND:"transitionend"+(e?" webkitTransitionEnd":""),ANIMATIONEND:"animationend"+(e?" webkitAnimationEnd":""),TRANSFORM:t("transform"),TRANSFORM_ORIGIN:t("transformOrigin"),TRANSITION:t("transition"),TRANSITION_DURATION:t("transitionDuration"),ANIMATION_PLAY_STATE:t("animationPlayState"),ANIMATION_DURATION:t("animationDuration"),ANIMATION_NAME:t("animationName"),ANIMATION_TIMING:t("animationTimingFunction"),ANIMATION_DIRECTION:t("animationDirection")},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 o}),function(){function t(e,d){var s=function(){return!0};e&&!de.isArray(e)&&(e=Array.prototype.slice.call(e)),d=!!d;var l=e||[];return{items:function(){return[].concat(l)},count:function(){return l.length},inRange:c,contains:t,indexOf:m,itemAt:function(e){return c(e)?l[e]:null},findBy:function(t,n){return l.filter(function(e){return e[t]===n})},add:function(e,t){if(!e)return-1;de.isNumber(t)||(t=l.length);return l.splice(t,0,e),m(e)},remove:function(e){t(e)&&l.splice(m(e),1)},first:u,last:p,next:de.bind(null,n,!1),previous:de.bind(null,n,!0),hasPrevious:function(e){return!!e&&c(m(e)-1)},hasNext:function(e){return!!e&&c(m(e)+1)}};function c(e){return l.length&&-1<e&&e<l.length}function m(e){return l.indexOf(e)}function t(e){return e&&-1<m(e)}function u(){return l.length?l[0]:null}function p(){return l.length?l[l.length-1]:null}function n(e,t,n,o){n=n||s;for(var i=m(t);;){if(!c(i))return null;var r=i+(e?-1:1),a=null;if(c(r)?a=l[r]:d&&(r=m(a=e?p():u())),null===a||r===o)return null;if(n(a))return a;de.isUndefined(o)&&(o=r),i=r}}}de.module("material.core").config(["$provide",function(e){e.decorator("$mdUtil",["$delegate",function(e){return e.iterator=t,e}])}])}(),function(){function e(a,t,i){var r={},d={},s={},n={};return e.getResponsiveAttribute=function(e,t){for(var n=0;n<a.MEDIA_PRIORITY.length;n++){var o=a.MEDIA_PRIORITY[n];if(d[r[o]].matches){var i=c(e,t+"-"+o);if(e[i])return e[i]}}return e[c(e,t)]},e.getQuery=function(e){return d[e]},e.watchResponsiveAttributes=function(e,o,i){var r=[];return e.forEach(function(e){var t=c(o,e);for(var n in de.isDefined(o[t])&&r.push(o.$observe(t,de.bind(void 0,i,null))),a.MEDIA)t=c(o,e+"-"+n),de.isDefined(o[t])&&r.push(o.$observe(t,de.bind(void 0,i,n)))}),function(){r.forEach(function(e){e()})}},e;function e(e){var t,n=r[e];de.isUndefined(n)&&(n=r[e]=(t=e,a.MEDIA[t]||("("!==t.charAt(0)?"("+t+")":t)));var o=s[n];return de.isUndefined(o)&&(o=function(e){var t=d[e];t||(t=d[e]=i.matchMedia(e));return t.addListener(l),s[t.media]=!!t.matches}(n)),o}function l(e){t.$evalAsync(function(){s[e.media]=!!e.matches})}function c(e,t){return n[t]||(n[t]=e.$normalize(t))}}e.$inject=["$mdConstant","$rootScope","$window"],de.module("material.core").factory("$mdMedia",e)}(),function(){function t(e,t){var o=["data","x"];return e?t?n(e):i(e):{buildList:i,buildSelector:n,hasAttribute:function(e,t){if(!(e=r(e)))return!1;for(var n=i(t),o=0;o<n.length;o++)if(e.hasAttribute(n[o]))return!0;return!1},removeAttribute:function(t,e){if(!(t=r(t)))return;i(e).forEach(function(e){t.removeAttribute(e)})}};function i(n){return(n=de.isArray(n)?n:[n]).forEach(function(t){o.forEach(function(e){n.push(e+"-"+t)})}),n}function n(e){return i(e=de.isArray(e)?e:[e]).map(function(e){return"["+e+"]"}).join(",")}function r(e){if((e=e[0]||e).nodeType)return e}}de.module("material.core").config(["$provide",function(e){e.decorator("$mdUtil",["$delegate",function(e){return e.prefixer=t,e}])}])}(),function(){e.$inject=["$document","$timeout","$compile","$rootScope","$$mdAnimate","$interpolate","$log","$rootElement","$window","$$rAF"];var b=0;function e(s,d,n,a,e,t,r,o,l,c){var i=t.startSymbol(),m=t.endSymbol(),u="{{"===i&&"}}
10510"===m,p=function(e,t,n){var o=!1;if(e&&e.length){var i=l.getComputedStyle(e[0]);o=de.isDefined(i[t])&&(!n||i[t]==n)}return o};function h(e){return e?-1<String(e).indexOf("px")||-1<String(e).indexOf("%")?e:e+"px":"0"}var f={dom:{},now:B.performance&&B.performance.now?de.bind(B.performance,B.performance.now):Date.now||function(){return(new Date).getTime()},getModelOption:function(e,t){if(e.$options){var n=e.$options;return n.getOption?n.getOption(t):n[t]}},bidi:function(e,t,n,o){var i=!("rtl"==s[0].dir||"rtl"==s[0].body.dir);if(0==arguments.length)return i?"ltr":"rtl";var r=de.element(e);i&&de.isDefined(n)?r.css(t,h(n)):!i&&de.isDefined(o)&&r.css(t,h(o))},bidiProperty:function(e,t,n,o){var i=!("rtl"==s[0].dir||"rtl"==s[0].body.dir),r=de.element(e);i&&de.isDefined(t)?(r.css(t,h(o)),r.css(n,"")):!i&&de.isDefined(n)&&(r.css(n,h(o)),r.css(t,""))},clientRect:function(e,t,n){var o=g(e);t=g(t||o.offsetParent||document.body);var i=o.getBoundingClientRect(),r=n?t.getBoundingClientRect():{left:0,top:0,width:0,height:0};return{left:i.left-r.left,top:i.top-r.top,width:i.width,height:i.height}},offsetRect:function(e,t){return f.clientRect(e,t,!0)},nodesToArray:function(e){e=e||[];for(var t=[],n=0;n<e.length;++n)t.push(e.item(n));return t},getViewportTop:function(){return B.scrollY||B.pageYOffset||0},findFocusTarget:function(e,t){var n,o=this.prefixer("md-autofocus",!0);return(n=i(e,t||o))||t==o||(n=i(e,this.prefixer("md-auto-focus",!0)))||(n=i(e,o)),n;function i(e,t){var n,o=e[0].querySelectorAll(t);return o&&o.length&&o.length&&de.forEach(o,function(e){(e=de.element(e)).hasClass("md-autofocus")&&(n=e)}),n}},disableScrollAround:function(e,t,o){if(o=o||{},f.disableScrollAround._count=Math.max(0,f.disableScrollAround._count||0),f.disableScrollAround._count++,f.disableScrollAround._restoreScroll)return f.disableScrollAround._restoreScroll;var d=s[0].body,n=function(){var e=s[0].documentElement,t=e.style.cssText||"",n=d.style.cssText||"",o=f.getViewportTop(),i=d.clientWidth,r=d.scrollHeight>d.clientHeight+1,a=0<e.scrollTop?e:d;r&&de.element(d).css({position:"fixed",width:"100%",top:-o+"px"});d.clientWidth<i&&(d.style.overflow="hidden");return function(){d.style.cssText=n,e.style.cssText=t,a.scrollTop=o}}(),i=function(e){var t;e=de.element(e||d),o.disableScrollMask?t=e:(t=de.element('<div class="md-scroll-mask"> <div class="md-scroll-mask-bar"></div></div>'),e.append(t));return t.on("wheel",n),t.on("touchmove",n),function(){t.off("wheel"),t.off("touchmove"),!o.disableScrollMask&&t[0].parentNode&&t[0].parentNode.removeChild(t[0])};function n(e){e.preventDefault()}}(t);return f.disableScrollAround._restoreScroll=function(){--f.disableScrollAround._count<=0&&(n(),i(),delete f.disableScrollAround._restoreScroll)}},enableScrolling:function(){var e=this.disableScrollAround._restoreScroll;e&&e()},floatingScrollbars:function(){if(this.floatingScrollbars.cached===se){var e=de.element("<div><div></div></div>").css({width:"100%","z-index":-1,position:"absolute",height:"35px","overflow-y":"scroll"});e.children().css("height","60px"),s[0].body.appendChild(e[0]),this.floatingScrollbars.cached=e[0].offsetWidth==e[0].childNodes[0].offsetWidth,e.remove()}return this.floatingScrollbars.cached},forceFocus:function(e){var n=e[0]||e;document.addEventListener("click",function e(t){t.target===n&&t.$focus&&(n.focus(),t.stopImmediatePropagation(),t.preventDefault(),n.removeEventListener("click",e))},!0);var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!1,!0,B,{},0,0,0,0,!1,!1,!1,!1,0,null),t.$material=!0,t.$focus=!0,n.dispatchEvent(t)},createBackdrop:function(e,t){return n(f.supplant('<md-backdrop class="{0}">',[t]))(e)},supplant:function(e,r,t){return t=t||/\{([^{}]*)\}/g,e.replace(t,function(t,e){var n=e.split("."),o=r;try{for(var i in n)n.hasOwnProperty(i)&&(o=o[n[i]])}catch(e){o=t}return"string"==typeof o||"number"==typeof o?o:t})},fakeNgModel:function(){return{$fake:!0,$setTouched:de.noop,$setViewValue:function(e){this.$viewValue=e,this.$render(e),this.$viewChangeListeners.forEach(function(e){e()})},$isEmpty:function(e){return 0===(""+e).length},$parsers:[],$formatters:[],$viewChangeListeners:[],$render:de.noop}},debounce:function(n,o,i,r){var a;return function(){var e=i,t=Array.prototype.slice.call(arguments);d.cancel(a),a=d(function(){a=se,n.apply(e,t)},o||10,r)}},throttle:function(n,o){var i;return function(){var e=arguments,t=f.now();(!i||o<t-i)&&(n.apply(this,e),i=t)}},time:function(e){var t=f.now();return e(),f.now()-t},valueOnUse:function(e,t,n){var o=null,i=Array.prototype.slice.call(arguments),r=3<i.length?i.slice(3):[];Object.defineProperty(e,t,{get:function(){return null===o&&(o=n.apply(e,r)),o}})},nextUid:function(){return""+b++},disconnectScope:function(e){if(e&&e.$root!==e&&!e.$$destroyed){var t=e.$parent;e.$$disconnected=!0,t.$$childHead===e&&(t.$$childHead=e.$$nextSibling),t.$$childTail===e&&(t.$$childTail=e.$$prevSibling),e.$$prevSibling&&(e.$$prevSibling.$$nextSibling=e.$$nextSibling),e.$$nextSibling&&(e.$$nextSibling.$$prevSibling=e.$$prevSibling),e.$$nextSibling=e.$$prevSibling=null}},reconnectScope:function(e){if(e&&e.$root!==e&&e.$$disconnected){var t=e,n=t.$parent;t.$$disconnected=!1,t.$$prevSibling=n.$$childTail,n.$$childHead?(n.$$childTail.$$nextSibling=t,n.$$childTail=t):n.$$childHead=n.$$childTail=t}},getClosest:function(e,t,n){if(de.isString(t)){var o=t.toUpperCase();
vendor: 4,750 bytes, line 10510
10510t=function(e){return e.nodeName.toUpperCase()===o}}if(e instanceof de.element&&(e=e[0]),n&&(e=e.parentNode),!e)return null;do{if(t(e))return e}while(e=e.parentNode);return null},elementContains:function(t,n){return(B.Node&&B.Node.prototype&&Node.prototype.contains?de.bind(t,t.contains):de.bind(t,function(e){return t===n||!!(16&this.compareDocumentPosition(e))}))(n)},extractElementByName:function(e,o,t,n){var i=d(e);return!i&&n&&r.warn(f.supplant("Unable to find node '{0}' in element '{1}'.",[o,e[0].outerHTML])),de.element(i||e);function d(e){return function(e){if(e)for(var t=0,n=e.length;t<n;t++)if(e[t].nodeName.toLowerCase()===o)return e[t];return null}(e)||(t?function(e){var t;if(e)for(var n=0,o=e.length;n<o;n++){var i=e[n];if(!t)for(var r=0,a=i.childNodes.length;r<a;r++)t=t||d([i.childNodes[r]])}return t}(e):null)}},initOptionalProperties:function(o,i,r){r=r||{},de.forEach(o.$$isolateBindings,function(e,t){if(e.optional&&de.isUndefined(o[t])){var n=de.isDefined(i[e.attrName]);o[t]=de.isDefined(r[t])?r[t]:n}})},nextTick:function(e,t,n){var o=f.nextTick,i=o.timeout,r=o.queue||[];return r.push({scope:n,callback:e}),null==t&&(t=!0),o.digest=o.digest||t,o.queue=r,i||(o.timeout=d(function(){var e=o.queue,t=o.digest;o.queue=[],o.timeout=null,o.digest=!1,e.forEach(function(e){e.scope&&e.scope.$$destroyed||e.callback()}),t&&a.$digest()},0,!1))},processTemplate:function(e){return u?e:e&&de.isString(e)?e.replace(/\{\{/g,i).replace(/}}/g,m):e},getParentWithPointerEvents:function(e){for(var t=e.parent();p(t,"pointer-events","none");)t=t.parent();return t},getNearestContentElement:function(e){for(var t=e.parent()[0];t&&t!==o[0]&&t!==document.body&&"MD-CONTENT"!==t.nodeName.toUpperCase();)t=t.parentNode;return t},checkStickySupport:function(){var e,t=de.element("<div>");s[0].body.appendChild(t[0]);for(var n=["sticky","-webkit-sticky"],o=0;o<n.length;++o)if(t.css({position:n[o],top:0,"z-index":2}),t.css("position")==n[o]){e=n[o];break}return t.remove(),e},parseAttributeBoolean:function(e,t){return""===e||!!e&&(!1===t||"false"!==e&&"0"!==e)},hasComputedStyle:p,isParentFormSubmitted:function(e){var t=f.getClosest(e,"form"),n=t?de.element(t).controller("form"):null;return!!n&&n.$submitted},animateScrollTo:function(o,i,r){var a=o.scrollTop,d=i-a,s=a<i,l=f.now();c(function e(){var t=(n=r||1e3,function(e,t,n,o){if(o<e)return t+n;var i=(e/=o)*e;return t+n*(i*e*-2+3*i)}(f.now()-l,a,d,n));var n;o.scrollTop=t;(s?t<i:i<t)&&c(e)})},uniq:function(e){if(e)return e.filter(function(e,t,n){return n.indexOf(e)===t})},getInnerHTML:function(e){var t=new XMLSerializer;return Array.prototype.map.call(e.childNodes,function(e){return t.serializeToString(e)}).join("")}};return f.dom.animator=e(f),f;function g(e){return e[0]||e}}de.module("material.core").factory("$mdUtil",e),de.element.prototype.focus=de.element.prototype.focus||function(){return this.length&&this[0].focus(),this},de.element.prototype.blur=de.element.prototype.blur||function(){return this.length&&this[0].blur(),this}}(),function(){function r(o,i,s,r){var a=this.showWarnings;return{expect:d,expectAsync:l,expectWithText:function(e,t){var n=c(e)||"";-1<n.indexOf(r.startSymbol())?l(e,t,function(){return c(e)}):d(e,t,n)},expectWithoutText:function(e,t){var n=c(e);-1<n.indexOf(r.startSymbol())||n||d(e,t,n)},getText:c,hasAriaLabel:m,parentHasAriaLabel:function e(t,n){n=n||1;var o=de.element(t)[0]||t;if(!o.parentNode)return!1;if(function(e){if(!m(e))return!1;if(e.hasAttribute("role"))switch(e.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!1}switch(e.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!1}return!0}(o.parentNode))return!0;n--;if(n)return e(o.parentNode,n);return!1}};function d(e,t,n){var o=de.element(e)[0]||e;
10510!o||o.hasAttribute(t)&&0!==o.getAttribute(t).length||function(e,t){var n=e.hasChildNodes(),o=!1;if(n)for(var i=e.childNodes,r=0;r<i.length;r++){var a=i[r];1===a.nodeType&&a.hasAttribute(t)&&(void 0,"none"!==((d=a).currentStyle?d.currentStyle:s.getComputedStyle(d)).display&&(o=!0))}var d;return o}(o,t)||((n=de.isString(n)?n.trim():"").length?e.attr(t,n):a&&i.warn('ARIA: Attribute "',t,'", required for accessibility, is missing on node:',o))}function l(e,t,n){o(function(){d(e,t,n())})}function c(t){t=t[0]||t;for(var e,n=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null,!1),o="";e=n.nextNode();)i(e)||(o+=e.textContent);return o.trim()||"";function i(e){for(;e.parentNode&&(e=e.parentNode)!==t;)if(e.getAttribute&&"true"===e.getAttribute("aria-hidden"))return!0}}function m(e){var t=de.element(e)[0]||e;return!!t.hasAttribute&&(t.hasAttribute("aria-label")||t.hasAttribute("aria-labelledby")||t.hasAttribute("aria-describedby"))}}r.$inject=["$$rAF","$log","$window","$interpolate"],de.module("material.core").provider("$mdAria",function(){var i={showWarnings:!0};return{disableWarnings:function(){i.showWarnings=!1},$get:["$$rAF","$log","$window","$interpolate",function(e,t,n,o){return r.apply(i,arguments)}]}})}(),function(){function e(r){var a=!1;function d(e,t,n,o,i){this.$q=e,this.$templateRequest=t,this.$injector=n,this.$compile=o,this.$controller=i}this.respectPreAssignBindingsEnabled=function(e){return de.isDefined(e)?(a=e,this):a},this.$get=["$q","$templateRequest","$injector","$compile","$controller",function(e,t,n,o,i){return new d(e,t,n,o,i)}],d.prototype.compile=function(e){return e.contentElement?this._prepareContentElement(e):this._compileTemplate(e)},d.prototype._prepareContentElement=function(e){var t=this._fetchContentElement(e);return this.$q.resolve({element:t.element,cleanup:t.restore,locals:{},link:function(){return t.element}})},d.prototype._compileTemplate=function(o){var i=this,e=o.templateUrl,t=o.template||"",n=de.extend({},o.resolve),r=de.extend({},o.locals),a=o.transformTemplate||de.identity;return de.forEach(n,function(e,t){de.isString(e)?n[t]=i.$injector.get(e):n[t]=i.$injector.invoke(e)}),de.extend(n,r),n.$$ngTemplate=e?this.$templateRequest(e):this.$q.when(t),this.$q.all(n).then(function(e){var t=a(e.$$ngTemplate,o),n=o.element||de.element("<div>").html(t.trim()).contents();return i._compileElement(e,n,o)})},d.prototype._compileElement=function(o,i,r){var a=this,d=this.$compile(i),s={element:i,cleanup:i.remove.bind(i),locals:o,link:function(e){if(o.$scope=e,r.controller){var t=de.extend({},o,{$element:i}),n=a._createController(r,t,o);i.data("$ngControllerController",n),i.children().data("$ngControllerController",n),s.controller=n}return d(e)}};return s},d.prototype._createController=function(e,t,n){var o;if(!a||("function"==typeof r.preAssignBindingsEnabled?r.preAssignBindingsEnabled():1===de.version.major&&de.version.minor<6)){var i=this.$controller(e.controller,t,!0);e.bindToController&&de.extend(i.instance,n),o=i()}else o=this.$controller(e.controller,t),e.bindToController&&de.extend(o,n);return e.controllerAs&&(t.$scope[e.controllerAs]=o),de.isFunction(o.$onInit)&&o.$onInit(),o},d.prototype._fetchContentElement=function(e){var t=e.contentElement,n=null;return de.isString(t)?n=o(t=document.querySelector(t)):(t=t[0]||t,n=document.contains(t)?o(t):function(){t.parentNode&&t.parentNode.removeChild(t)}),{element:de.element(t),restore:n};function o(e){var t=e.parentNode,n=e.nextElementSibling;return function(){n?t.insertBefore(e,n):t.appendChild(e)}}}}de.module("material.core").provider("$mdCompiler",e),e.$inject=["$compileProvider"]}(),function(){i.$inject=["$$MdGestureHandler","$$rAF","$timeout"];var r,o,c={},m=6,u=!(n.$inject=["$mdGesture","$$MdGestureHandler"]),a=!1,d=null,s=!1;function e(){}function i(o,e,n){var t=navigator.userAgent||navigator.vendor||B.opera,i=t.match(/ipad|iphone|ipod/i),r=t.match(/android/i),a=function(){for(var e=document.createElement("div"),t=["","webkit","Moz","MS","ms","o"],n=0;n<t.length;n++){var o=t[n],i=o?o+"TouchAction":"touchAction";if(de.isDefined(e.style[i]))return i}}(),d=void 0!==B.jQuery&&de.element===B.jQuery,s={handler:function(e,t){var n=new o(e);return de.extend(n,t),c[e]=n,s},register:function(e,t,n){var o=c[t.replace(/^\$md./,"")];if(!o)throw new Error("Failed to register element with handler "+t+". Available handlers: "+Object.keys(c).join(", "));return o.registerElement(e,n)},isAndroid:r,isIos:i,isHijackingClicks:(i||r)&&!d&&!u};function l(n){return function(e,t){t.distance<this.state.options.maxDistance&&this.dispatchEvent(e,n,t)}}return s.isHijackingClicks&&(s.handler("click",{options:{maxDistance:m},onEnd:l("click")}),s.handler("focus",{options:{maxDistance:m},onEnd:function(e,t){t.distance<this.state.options.maxDistance&&b(e.target)&&(this.dispatchEvent(e,"focus",t),e.target.focu
vendor: 11,707 bytes, line 10510
10510s())}}),s.handler("mouseup",{options:{maxDistance:m},onEnd:l("mouseup")}),s.handler("mousedown",{onStart:function(e){this.dispatchEvent(e,"mousedown")}})),s.handler("press",{onStart:function(e,t){this.dispatchEvent(e,"$md.pressdown")},onEnd:function(e,t){this.dispatchEvent(e,"$md.pressup")}}).handler("hold",{options:{maxDistance:6,delay:500},onCancel:function(){n.cancel(this.state.timeout)},onStart:function(e,t){if(!this.state.registeredParent)return this.cancel();this.state.pos={x:t.x,y:t.y},this.state.timeout=n(de.bind(this,function(){this.dispatchEvent(e,"$md.hold"),this.cancel()}),this.state.options.delay,!1)},onMove:function(e,t){a||"touchmove"!==e.type||e.preventDefault();var n=this.state.pos.x-t.x,o=this.state.pos.y-t.y;Math.sqrt(n*n+o*o)>this.options.maxDistance&&this.cancel()},onEnd:function(){this.onCancel()}}).handler("drag",{options:{minDistance:6,horizontal:!0,cancelMultiplier:1.5},onSetup:function(e,t){a&&(this.oldTouchAction=e[0].style[a],e[0].style[a]=t.horizontal?"pan-y":"pan-x")},onCleanup:function(e){this.oldTouchAction&&(e[0].style[a]=this.oldTouchAction)},onStart:function(e){this.state.registeredParent||this.cancel()},onMove:function(e,t){var n,o;a||"touchmove"!==e.type||e.preventDefault(),this.state.dragPointer?this.dispatchDragMove(e):(this.state.options.horizontal?(n=Math.abs(t.distanceX)>this.state.options.minDistance,o=Math.abs(t.distanceY)>this.state.options.minDistance*this.state.options.cancelMultiplier):(n=Math.abs(t.distanceY)>this.state.options.minDistance,o=Math.abs(t.distanceX)>this.state.options.minDistance*this.state.options.cancelMultiplier),n?(this.state.dragPointer=p(e),f(e,this.state.dragPointer),this.dispatchEvent(e,"$md.dragstart",this.state.dragPointer)):o&&this.cancel())},dispatchDragMove:e.throttle(function(e){this.state.isRunning&&(f(e,this.state.dragPointer),this.dispatchEvent(e,"$md.drag",this.state.dragPointer))}),onEnd:function(e,t){this.state.dragPointer&&(f(e,this.state.dragPointer),this.dispatchEvent(e,"$md.dragend",this.state.dragPointer))}}).handler("swipe",{options:{minVelocity:.65,minDistance:10},onEnd:function(e,t){var n;Math.abs(t.velocityX)>this.state.options.minVelocity&&Math.abs(t.distanceX)>this.state.options.minDistance?(n="left"==t.directionX?"$md.swipeleft":"$md.swiperight",this.dispatchEvent(e,n)):Math.abs(t.velocityY)>this.state.options.minVelocity&&Math.abs(t.distanceY)>this.state.options.minDistance&&(n="up"==t.directionY?"$md.swipeup":"$md.swipedown",this.dispatchEvent(e,n))}})}function t(e){this.name=e,this.state={}}function n(e,i){if(!a){document.contains||(document.contains=function(e){return document.body.contains(e)}),!s&&e.isHijackingClicks&&(document.addEventListener("click",function(e){var t=0===e.clientX&&0===e.clientY,n=e.target&&"submit"===e.target.type;t||e.$material||e.isIonicTap||h(e)||n?(d=null,"label"==e.target.tagName.toLowerCase()&&(d={x:e.x,y:e.y})):(e.preventDefault(),e.stopPropagation(),d=null)},!0),document.addEventListener("mouseup",t,!0),document.addEventListener("mousedown",t,!0),document.addEventListener("focus",t,!0),s=!0);de.element(document).on("mousedown touchstart pointerdown",function(e){if(r)return;var t=+Date.now();if(o&&!l(e,o)&&t-o.endTime<1500)return;r=p(e),n("start",e)}).on("mousemove touchmove pointermove",function(e){if(!r||!l(e,r))return;f(e,r),n("move",e)}).on("mouseup mouseleave touchend touchcancel pointerup pointercancel",function(e){if(!r||!l(e,r))return;f(e,r),r.endTime=+Date.now(),"pointercancel"!==e.type&&n("end",e);o=r,r=null}).on("$$mdGestureReset",function(){o=r=null})}function t(e){!e.clientX&&!e.clientY||e.$material||e.isIonicTap||h(e)||"mousedown"===e.type&&(b(e.target)||b(document.activeElement))||(e.preventDefault(),e.stopPropagation())}function n(e,t){var n;for(var o in c)(n=c[o])instanceof i&&("start"===e&&n.cancel(),n[e](t,r))}}function p(e){var t=g(e),n={startTime:+Date.now(),target:e.target,type:e.type.charAt(0)};return n.startX=n.x=t.pageX,n.startY=n.y=t.pageY,n}function l(e,t){return e&&t&&e.type.charAt(0)===t.type}function h(e){return d&&d.x==e.x&&d.y==e.y}function f(e,t){var n=g(e),o=t.x=n.pageX,i=t.y=n.pageY;t.distanceX=o-t.startX,t.distanceY=i-t.startY,t.distance=Math.sqrt(t.distanceX*t.distanceX+t.distanceY*t.distanceY),t.directionX=0<t.distanceX?"right":t.distanceX<0?"left":"",t.directionY=0<t.distanceY?"down":t.distanceY<0?"up":"",t.duration=+Date.now()-t.startTime,t.velocityX=t.distanceX/t.duration,t.velocityY=t.distanceY/t.duration}function g(e){return(e=e.originalEvent||e).touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0]||e}function b(e){return!!e&&"-1"!==e.getAttribute("tabindex")&&!e.hasAttribute("disabled")&&(e.hasAttribute("tabindex")||e.hasAttribute("href")||e.isContentEditable||-1!==["INPUT","SELECT","BUTTON","TEXTAREA","VIDEO","AUDIO"].indexOf(e.nodeName))}de.module("material.core.gestures",[]).provider("$mdGesture",e).factory("$$MdGestureHandler",function(){var e=void 0!==B.jQuery&&de.element===B.jQuery;return t.prototype={options:{},dispatchEvent:e?function(e,t,n){n=n||r;var o=new de.element.Event(t);o.$material=!0,o.pointer=n,o.srcEvent=e,de.extend(o,{clientX:n.x,clientY:n.y,screenX:n.x,screenY:n.y,pageX:n.x,pageY:n.y,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey}),de.element(n.target).trigger(o)}:function(e,t,n){var o;n=n||r,"click"===t||"mouseup"===t||"mousedown"===t?(o=document.createEvent("MouseEvents")).initMouseEvent(t,!0,!0,B,e.detail,n.x,n.y,n.x,n.y,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget||null):(o=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,{}),o.$material=!0,o.pointer=n,o.srcEvent=e,n.target.dispatchEvent(o)},onSetup:de.noop,onCleanup:de.noop,onStart:de.noop,onMove:de.noop,onEnd:de.noop,onCancel:de.noop,start:function(e,t){if(!this.state.isRunning){var n=this.getNearestParent(e.target),o=n&&n.$mdGesture[this.name]||{};this.state={isRunning:!0,options:de.extend({},this.options,o),registeredParent:n},this.onStart(e,t)}},move:function(e,t){this.state.isRunning&&this.onMove(e,t)},end:function(e,t){this.state.isRunning&&(this.onEnd(e,t),this.state.isRunning=!1)},cancel:function(e,t){this.onCancel(e,t),this.state={}},getNearestParent:function(e){for(var t=e;t;){if((t.$mdGesture||{})[this.name])return t;t=t.parentNode}return null},registerElement:function(e,t){var n=this;return e[0].$mdGesture=e[0].$mdGesture||{},e[0].$mdGesture[this.name]=t||{},e.on("$destroy",o),n.onSetup(e,t||{}),o;function o(){delete e[0].$mdGesture[n.name],e.off("$destroy",o),n.onCleanup(e,t||{})}}},t}).run(n),e.prototype={disableAll:function(){a=!0},skipClickHijack:function(){return u=!0},setMaxClickDistance:function(e){m=parseInt(e)},$get:["$$MdGestureHandler","$$rAF","$timeout",function(e,t,n){return new i(e,t,n)}]}}(),function(){function e(e,t){this.$timeout=e,this.$mdUtil=t,this.bodyElement=de.element(document.body),this.isBuffering=!1,this.bufferTimeout=null,this.lastInteractionType=null,this.lastInteractionTime=null,this.inputEventMap={keydown:"keyboard",mousedown:"mouse",mouseenter:"mouse",touchstart:"touch",pointerdown:"pointer",MSPointerDown:"pointer"},this.iePointerMap={2:"touch",3:"touch",4:"mouse"},this.initializeEvents()}e.$inject=["$timeout","$mdUtil"],de.module("material.core.interaction",[]).service("$mdInteraction",e),e.prototype.initializeEvents=function(){var e="MSPointerEvent"in B?"MSPointerDown":"PointerEvent"in B?"pointerdown":null;this.bodyElement.on("keydown mousedown",this.onInputEvent.bind(this)),"ontouchstart"in document.documentElement&&this.bodyElement.on("touchstart",this.onBufferInputEvent.bind(this)),e&&this.bodyElement.on(e,this.onInputEvent.bind(this))},e.prototype.onInputEvent=function(e){if(!this.isBuffering){var t=this.inputEventMap[e.type];"pointer"===t&&(t=this.iePointerMap[e.pointerType]||e.pointerType),this.lastInteractionType=t,this.lastInteractionTime=this.$mdUtil.now()}},e.prototype.onBufferInputEvent=function(e){this.$timeout.cancel(this.bufferTimeout),this.onInputEvent(e),this.isBuffering=!0,this.bufferTimeout=this.$timeout(function(){this.isBuffering=!1}.bind(this),650,!1)},e.prototype.getLastInteractionType=function(){return this.lastInteractionType},e.prototype.isUserInvoked=function(e){var t=de.isNumber(e)?e:15;return this.lastInteractionTime>=this.$mdUtil.now()-t}}(),de.module("material.core").provider("$$interimElement",function(){return t.$inject=["$document","$q","$rootScope","$timeout","$rootElement","$animate","$mdUtil","$mdCompiler","$mdTheming","$injector","$exceptionHandler"],e.$get=t,e;function e(i){e.$inject=["$$interimElement","$injector"];var n=["onHide","onShow","onRemove"],r={},l={presets:{}},o={setDefaults:function(e){return l.optionsFactory=e.options,l.methods=(e.methods||[]).concat(n),o},addPreset:function(e,t){if((t=t||{}).methods=t.methods||[],t.options=t.options||function(){return{}},/^cancel|hide|show$/.test(e))throw new Error("Preset '"+e+"' in "+i+" is reserved!");if(-1<t.methods.indexOf("_options"))throw new Error("Method '_options' in "+i+" is reserved!");return l.presets[e]={methods:t.methods.concat(n),optionsFactory:t.options,argOption:t.argOption},o},addMethod:function(e,t){return r[e]=t,o},$get:e};return o.addPreset("build",{methods:["controller","controllerAs","resolve","multiple","template","templateUrl","themable","transformTemplate","parent","contentElement"]}),o;function e(e,o){var a,t,n=e(),d={hide:n.hide,cancel:n.cancel,show:function(e){return(e=e||{})._options&&(e=e._options),n.show(de.extend({},t,e))},destroy:function(e){return n.destroy(e)}};return a=l.methods||[],t=s(l.optionsFactory,{}),de.forEach(r,function(e,t){d[t]=e}),de.forEach(l.presets,function(t,n){var o=s(t.optionsFactory,{}),e=(t.methods||[]).concat(a);function i(e){this._options=de.extend({},o,e)}if(de.extend(o,{$type:n}),de.forEach(e,function(t){i.prototype[t]=function(e){return this._options[t]=e,this}}),t.argOption){var r="show"+n.charAt(0).toUpperCase()+n.slice(1);d[r]=function(e){var t=d[n](e);return d.show(t)}}d[n]=function(e){return arguments.length&&t.argOption&&!de.isObject(e)&&!de.isArray(e)?(new i)[t.argOption](e):new i(e)}}),d;function s(e,t){var n={};return n[i]=d,o.invoke(e||function(){return t},{},n)}}}function t(m,u,t,p,h,o,n,f,g,s,l){return function(){var c,i=[],r=[],a=[];return c={show:function(e){var t=new d((e=e||{})||{}),n=e.multiple?u.resolve():u.all(i);e.multiple||(n=n.then(function(){var e=r.concat(a.map(c.cancel));return u.all(e)}));var o=n.then(function(){return t.show().catch(function(e){return e}).finally(function(){i.splice(i.indexOf(o),1),a.push(t)})});return i.push(o),t.deferred.promise.catch(function(e){return e instanceof Error&&l(e),e}),t.deferred.promise},hide:e(function(n,o){return(o=o||{}).closeAll?u.all(a.slice().reverse().map(e)):o.closeTo!==se?u.all(a.slice(o.closeTo).map(e)):e(a[a.length-1]);function e(e){if(!e)return u.when(n);var t=e.remove(n,!1,o||{}).catch(function(e){return e}).finally(function(){r.splice(r.indexOf(t),1)});return a.splice(a.indexOf(e),1),r.push(t),e.deferred.promise}}),cancel:e(function(e,t){var n=a.pop();if(!n)return u.when(e);var o=n.remove(e,!0,t||{}).catch(function(e){return e}).finally(function(){r.splice(r.indexOf(o),1)});return r.push(o),n.deferred.promise.catch(de.noop)}),destroy:function(e){var t=e?null:a.shift(),n=de.element(e).length&&de.element(e)[0].parentNode;if(n){var o=a.filter(function(e){return e.options.element[0]===n});o.length&&(t=o[0],a.splice(a.indexOf(t),1))}return t?t.remove(!1,!1,{$destroy:!0}):u.when(!1)},$injector_:s};function e(t){return function(){var e=arguments;return a.length?t.apply(c,e):i.length?i[0].finally(function(){return t.apply(c,e)}):u.when("No interim elements currently showing up.")}}function d(a){var r,d,e,s=u.when(!0);
10510return(e=(e=a)||{}).template&&(e.template=n.processTemplate(e.template)),a=de.extend({preserveScope:!1,cancelAutoHide:de.noop,scope:e.scope||t.$new(e.isolateScope),onShow:function(e,t,n){return o.enter(t,n.parent)},onRemove:function(e,t){return t&&o.leave(t)||u.when()}},e),r={options:a,deferred:u.defer(),show:function(){return u(function(t,n){var o;function i(e){r.deferred.reject(e),n(e)}a.onCompiling&&a.onCompiling(a),(o=a,(o.skipCompile?null:f.compile(o))||u(function(e){e({locals:{},link:function(){return o.element}})})).then(function(e){d=function(e,t){de.extend(e.locals,t);var n,o,i,r,a=e.link(t.scope);return t.element=a,t.parent=(n=a,r=(o=t).parent,((r=de.isFunction(r)?r(o.scope,n,o):de.isString(r)?de.element(m[0].querySelector(r)):de.element(r))||{}).length?r:(h[0]&&h[0].querySelector&&(i=h[0].querySelector(":not(svg) > body")),i||(i=h[0]),"#comment"==i.nodeName&&(i=m[0].body),de.element(i))),t.themable&&g(a),a}(e,a),a.cleanupElement=e.cleanup,s=function(o,i,e){var t=i.onShowing||de.noop,r=i.onComplete||de.noop;try{t(i.scope,o,i,e)}catch(e){return u.reject(e)}return u(function(n,t){try{u.when(i.onShow(i.scope,o,i,e)).then(function(){var e,t;r(i.scope,o,i),t=de.noop,a.hideDelay&&(e=p(c.hide,a.hideDelay),t=function(){p.cancel(e)}),a.cancelAutoHide=function(){t(),a.cancelAutoHide=se},n(o)},t)}catch(e){t(e.message)}})}(d,a,e.controller).then(t,i)}).catch(i)})},remove:function(e,t,n){return d?((a=de.extend(a||{},n||{})).cancelAutoHide&&a.cancelAutoHide(),a.element.triggerHandler("$mdInterimElementRemove"),!0===a.$destroy?l(a.element,a).then(function(){t&&i(e)||o(e)}):(u.when(s).finally(function(){l(a.element,a).then(function(){t?i(e):o(e)},i)}),r.deferred.promise)):u.when(!1);function o(e){r.deferred.resolve(e)}function i(e){r.deferred.reject(e)}}};function l(o,i){var r=i.onRemoving||de.noop;return u(function(e,t){try{var n=u.when(i.onRemove(i.scope,o,i)||!0);r(o,n),i.$destroy?(e(o),!i.preserveScope&&i.scope&&n.then(function(){i.scope.$destroy()})):n.then(function(){!i.preserveScope&&i.scope&&i.scope.$destroy(),e(o)},t)}catch(e){t(e.message)}})}}}}}),function(){var d,l,c,s=/(-gt)?-(sm|md|lg|print)/g,m=/\s+/g,u=["grow","initial","auto","none","noshrink","nogrow"],p=["row","column"],h=["","start","center","end","stretch","space-around","space-between"],f=["","start","center","end","stretch"],g={enabled:!0,breakpoints:[]};function b(){var e=!!document.querySelector("[md-layouts-disabled]");g.enabled=!e}function v(){return g.enabled=!1,{restrict:"A",priority:"900"}}function E(o){return["$mdUtil","$interpolate","$log",function(e,t,n){return d=e,l=t,c=n,{restrict:"A",compile:function(e,t){var n;return g.enabled&&(C(o,A(o,t,""),M(0,o,t)),i(0,e),n=i),n||de.noop}}}];function i(e,t){t.addClass(o)}}function $(t){var n=t.split("-");return["$log",function(e){return e.warn(t+"has been deprecated. Please use a `"+n[0]+"-gt-<xxx>` variant."),de.noop}]}function y(e,t,n,o){var i,r=n[0].nodeName.toLowerCase();switch(e.replace(s,"")){case"flex":"md-button"!=r&&"fieldset"!=r||(i="<"+r+" "+e+"></"+r+">",o.warn(d.supplant("Markup '{0}' may not work as expected in IE Browsers. Consult '{1}' for details.",[i,"https://github.com/philipwalton/flexbugs#9-some-html-elements-cant-be-flex-containers"])))}}function C(e,t,n){if(!T(t)){switch(e.replace(s,"")){case"layout":w(t,p)||(t=p[0]);break;case"flex":w(t,u)||isNaN(t)&&(t="");break;case"flex-offset":case"flex-order":t&&!isNaN(+t)||(t="0");break;case"layout-align":var o=(a={main:"start",cross:"stretch"},0!==(i=(i=t)||"").indexOf("-")&&0!==i.indexOf(" ")||(i="none"+i),(r=i.toLowerCase().trim().replace(m,"-").split("-")).length&&"space"===r[0]&&(r=[r[0]+"-"+r[1],r[2]]),0<r.length&&(a.main=r[0]||a.main),1<r.length&&(a.cross=r[1]||a.cross),h.indexOf(a.main)<0&&(a.main="start"),f.indexOf(a.cross)<0&&(a.cross="stretch"),a);t=d.supplant("{main}-{cross}",o);break;case"layout-padding":case"layout-margin":case"layout-fill":case"layout-wrap":case"layout-nowrap":t=""}null!=t&&(n||de.noop)(t)}var i,r,a;return t?t.trim():""}function M(e,t,n){return function(e){T(e)||(n[n.$normalize(t)]=e)}}function T(e){return-1<(e||"").indexOf(l.startSymbol())}function A(e,t,n){var o=t.$normalize(e);return t[o]?t[o].trim().replace(m,"-"):n||null}function w(t,e,n){t=n&&t?t.replace(m,n):t;var o=!1;return t&&e.forEach(function(e){e=n?e.replace(m,n):e,o=o||e===t}),o}!function(o){var i,t=/^((?:x|data)[:\-_])/i,n=/([:\-_]+(.))/g,e=["layout","flex","flex-order","flex-offset","layout-align"],r=["show","hide","layout-padding","layout-margin"];function a(e){return e.replace(t,"").replace(n,function(e,t,n,o){return o?n.toUpperCase():n})}de.forEach(["","xs","gt-xs","sm","gt-sm","md","gt-md","lg","gt-lg","xl","print"],function(n){de.forEach(e,function(e){var t=n?e+"-"+n:e;o.directive(a(t),function(s){return["$mdUtil","$interpolate","$log",function(e,t,n){return d=e,l=t,c=n,{restrict:"A",compile:function(e,t){var n;return g.enabled&&(y(s,0,e,c),C(s,A(s,t,""),M(0,s,t)),n=o),n||de.noop}}}];function o(e,t,n){var o,i,r,a=(o=t,i=s,function(e){var t=C(i,e||"");de.isDefined(t)&&(r&&o.removeClass(r),r=t?i+"-"+t.trim().replace(m,"-"):i,o.addClass(r))}),d=n.$observe(n.$normalize(s),a);a(A(s,n,"")),e.$on("$destroy",function(){d()})}}(t))}),de.forEach(r,function(e){var t=n?e+"-"+n:e;o.directive(a(t),E(t))})}),o.provider("$$mdLayout",function(){return{$get:de.noop,validateAttributeValue:C,validateAttributeUsage:y,disableLayouts:function(e){g.enabled=!0!==e}}}).directive("mdLayoutCss",v).directive("ngCloak",(i="ng-cloak",["$timeout",function(n){return{restrict:"A",priority:-10,compile:function(e){return g.enabled?(e.addClass(i),function(e,t){n(function(){t.removeClass(i)},10,!1)}):de.noop}}}])).directive("layoutWrap",E("layout-wrap")).directive("layoutNowrap",E("layout-nowrap")).directive("layoutNoWrap",E("layout-no-wrap")).directive("layoutFill",E("layout-fill")).directive("layoutLtMd",$("layout-lt-md")).directive("layoutLtLg",$("layout-lt-lg")).directive("flexLtMd",$("flex-lt-md")).directive("flexLtLg",$("flex-lt-lg")).directive("layoutAlignLtMd",$("layout-align-lt-md")).directive("layoutAlignLtLg",$("layout-align-lt-lg")).directive("flexOrderLtMd",$("flex-order-lt-md")).directive("flexOrderLtLg",$("flex-order-lt-lg")).directive("offsetLtMd",$("flex-offset-lt-md")).directive("offsetLtLg",$("flex-offset-lt-lg")).directive("hideLtMd",$("hide-lt-md")).directive("hideLtLg",$("hide-lt-lg")).directive("showLtMd",$("show-lt-md")).directive("showLtLg",$("show-lt-lg")).config(b)}(de.module("material.core.layout",["ng"]))}(),function(){function e(e){this._$timeout=e,this._liveElement=this._createLiveElement(),this._announceTimeout=100}e.$inject=["$timeout"],de.module("material.core").service("$mdLiveAnnouncer",e),e.prototype.announce=function(e,t){t||(t="polite");var n=this;n._liveElement.textContent="",n._liveElement.setAttribute("aria-live",t),n._$timeout(function(){n._liveElement.textContent=e},n._announceTimeout,!1)},e.prototype._createLiveElement=function(){var e=document.createElement("div");return e.classList.add("md-visually-hidden"),e.setAttribute("role","status"),e.setAttribute("aria-atomic","true"),e.setAttribute("aria-live","polite"),document.body.appendChild(e),e}}(),de.module("material.core.meta",[]).provider("$$mdMeta",function(){var o=de.element(document.head),i={};function r(e){if(i[e])return!0;var t=document.getElementsByName(e)[0];return!!t&&(i[e]=de.element(t),!0)}var e={setMeta:function(e,t){if(r(e),i[e])i[e].attr("content",t);else{var n=de.element('<meta name="'+e+'" content="'+t+'"/>');o.append(n),i[e]=n}return function(){i[e].attr("content",""),i[e].remove(),delete i[e]}},getMeta:function(e){if(!r(e))throw Error("$$mdMeta: could not find a meta tag with the name '"+e+"'");return i[e].attr("content")}};return de.extend({},e,{$get:function(){return e}})}),function(){function e(n,o){var i,r=[],a={};return i={notFoundError:function(e,t){n.error((t||"")+"No instance found for handle",e)},getInstances:function(){return r},get:function(e){if(!d(e))return null;var t,n,o;for(t=0,n=r.length;t<n;t++)if((o=r[t]).$$mdHandle===e)return o;return null}
vendor: 9,639 bytes, line 10510
10510,register:function(t,e){return e?(t.$$mdHandle=e,r.push(t),(n=a[e])&&(n.forEach(function(e){e.resolve(t)}),delete a[e]),function(){var e=r.indexOf(t);-1!==e&&r.splice(e,1)}):de.noop;var n},when:function(e){if(d(e)){var t=o.defer(),n=i.get(e);return n?t.resolve(n):(a[e]===se&&(a[e]=[]),a[e].push(t)),t.promise}return o.reject("Invalid `md-component-id` value.")}};function d(e){return e&&""!==e}}e.$inject=["$log","$q"],de.module("material.core").factory("$mdComponentRegistry",e)}(),de.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 A100",contrastStrongLightColors:"400 500 600 700 A200 A400 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 A100",contrastStrongLightColors:"500 600 A200 A400 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 A100",contrastStrongLightColors:"300 400 A200 A400 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 A100",contrastStrongLightColors:"300 400 A200"},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 A100",contrastStrongLightColors:"300 400 A200 A400"},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",contrastDarkColors:"50 100 200 300 400 A100",contrastStrongLightColors:"500 600 700 A200 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",contrastLightColors:"600 700 800 900 A700",contrastStrongLightColors:"600 700 800 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",contrastLightColors:"700 800 900",contrastStrongLightColors:"700 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",contrastLightColors:"500 600 700 800 900",contrastStrongLightColors:"500 600 700"},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",contrastLightColors:"500 600 700 800 900",contrastStrongLightColors:"500 600 700"},"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",contrastLightColors:"700 800 900",contrastStrongLightColors:"700 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",contrastLightColors:"900",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",contrastLightColors:"800 900",contrastStrongLightColors:"800 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:"light",contrastDarkColors:"50 100 200 300 400 A100 A200",contrastStrongLightColors:"500 600 700 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 A100 A200",contrastStrongLightColors:"300 400"},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:"600 700 800 900 A200 A400 A700"},"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 A100 A200",contrastStrongLightColors:"400 500 700"}}),function(E){function e(e){var t=!!document.querySelector("[md-themes-disabled]");e.disableTheming(t)}e.$inject=["$mdThemingProvider"],n.$inject=["$mdTheming","$interpolate","$parse","$mdUtil","$q","$log"],o.$inject=["$mdTheming"],t.$inject=["$mdColorPalette","$$mdMetaProvider"],i.$inject=["$injector","$mdTheming"],E.module("material.core.theming",["material.core.theming.palette","material.core.meta"]).directive("mdTheme",n).directive("mdThemable",o).directive("mdThemesDisabled",function(){return y.disableTheming=!0,{restrict:"A",priority:"900"}}).provider("$mdTheming",t).config(e).run(i);var h,s={},d={name:"dark",1:"rgba(0,0,0,0.87)",2:"rgba(0,0,0,0.54)",3:"rgba(0,0,0,0.38)",4:"rgba(0,0,0,0.12)"},l={name:"light",1:"rgba(255,255,255,1.0)",2:"rgba(255,255,255,0.7)",3:"rgba(255,255,255,0.5)",4:"rgba(255,255,255,0.12)"},c="1px 1px 0px rgba(0,0,0,0.4), -1px -1px 0px rgba(0,0,0,0.4)",f="",m=A("rgba(0,0,0,0.87)"),u=A("rgba(255,255,255,0.87)"),p=A("rgb(255,255,255)"),g=["primary","accent","warn","background"],a="primary",b={accent:{default:"A200","hue-1":"A100","hue-2":"A400","hue-3":"A700"},background:{default:"50","hue-1":"A100","hue-2":"100","hue-3":"300"}},v={background:{default:"A400","hue-1":"800","hue-2":"900","hue-3":"A200"}};g.forEach(function(e){var t={default:"500","hue-1":"300","hue-2":"800","hue-3":"A100"};b[e]||(b[e]=t),v[e]||(v[e]=t)});var $=["50","100","200","300","400","500","600","700","800","900","A100","A200","A400","A700"],y={disableTheming:!1,generateOnDemand:!1,registeredStyles:[],nonce:null};function t(e,s){a.$inject=["$rootScope","$mdUtil","$q","$log"];var n,m={},u=!(h={}),p="default";E.extend(h,e);var t=function(e){var t,n,o,i=(e=E.isObject(e)?e:{}).theme||"default",r=e.hue||"800",a=h[e.palette]||h[m[i].colors[e.palette||"primary"].name],d=E.isObject(a[r])?a[r].hex:a[r];return"#"!==d.substr(0,1)&&(d="#"+d),t=d,n=s.setMeta("theme-color",t),o=s.setMeta("msapplication-navbutton-color",t),function(){n(),o()}};return n={definePalette:function(e,t){return t=t||{},h[e]=o(e,t),n},extendPalette:function(e,t){return o(e,E.extend({},h[e]||{},t))},theme:r,configuration:function(){return E.extend({},y,{defaultTheme:p,alwaysWatchTheme:u,registeredStyles:[].concat(y.registeredStyles)})},disableTheming:function(e){y.disableTheming=E.isUndefined(e)||!!e},registerStyles:function(e){y.registeredStyles.push(e)},setNonce:function(e){y.nonce=e},generateThemesOnDemand:function(e){y.generateOnDemand=e},setDefaultTheme:function(e){p=e},alwaysWatchTheme:function(e){u=e},enableBrowserColor:t,$get:a,_LIGHT_DEFAULT_HUES:b,_DARK_DEFAULT_HUES:v,_PALETTES:h,_THEMES:m,_parseRules:C,_rgba:w};function o(e,t){var n=$.filter(function(e){return!t[e]});if(n.length)throw new Error("Missing colors %1 in palette %2!".replace("%1",n.join(", ")).replace("%2",e));return t}function r(e,t){if(m[e])return m[e];var n="string"==typeof(t=t||"default")?m[t]:t,o=new i(e);return n&&E.forEach(n.colors,function(e,t){o.colors[t]={name:e.name,hues:E.extend({},e.hues)}}),m[e]=o}function i(e){var a=this;function t(e){if((e=0===arguments.length||!!e)!==a.isDark){a.isDark=e,a.foregroundPalette=a.isDark?l:d,a.foregroundShadow=a.isDark?c:f;var t=a.isDark?v:b,r=a.isDark?b:v;
10510return E.forEach(t,function(e,t){var n=a.colors[t],o=r[t];if(n)for(var i in n.hues)n.hues[i]===o[i]&&(n.hues[i]=e[i])}),a}}a.name=e,a.colors={},(a.dark=t)(!1),g.forEach(function(o){var i=(a.isDark?v:b)[o];a[o+"Palette"]=function(t,e){var n=a.colors[o]={name:t,hues:E.extend({},i,e)};return Object.keys(n.hues).forEach(function(e){if(!i[e])throw new Error("Invalid hue name '%1' in theme %2's %3 color %4. Available hue names: %4".replace("%1",e).replace("%2",a.name).replace("%3",t).replace("%4",Object.keys(i).join(", ")))}),Object.keys(n.hues).map(function(e){return n.hues[e]}).forEach(function(e){if(-1==$.indexOf(e))throw new Error("Invalid hue value '%1' in theme %2's %3 color %4. Available hue values: %5".replace("%1",e).replace("%2",a.name).replace("%3",o).replace("%4",t).replace("%5",$.join(", ")))}),a},a[o+"Color"]=function(){var e=Array.prototype.slice.call(arguments);return console.warn("$mdThemingProviderTheme."+o+"Color() has been deprecated. Use $mdThemingProviderTheme."+o+"Palette() instead."),a[o+"Palette"].apply(a,e)}})}function a(n,s,o,l){var i=function(e,t){t===se&&(t=e,e=se),e===se&&(e=n),i.inherit(t,t)};return Object.defineProperty(i,"THEMES",{get:function(){return E.extend({},m)}}),Object.defineProperty(i,"PALETTES",{get:function(){return E.extend({},h)}}),Object.defineProperty(i,"ALWAYS_WATCH",{get:function(){return u}}),i.inherit=function(n,e){var o=e.controller("mdTheme")||n.data("$mdThemeController"),t=n.scope();if(d(o&&o.$mdTheme||("default"===p?"":p)),o){var i=u||o.$shouldWatch||s.parseAttributeBoolean(n.attr("md-theme-watch"));if(i||o.isAsyncTheme){var r=function(){a&&(a(),a=se)},a=o.registerChanges(function(e){d(e),i||r()});t?t.$on("$destroy",r):n.on("$destroy",r)}}function d(e){if(e){c(e)||l.warn("Attempted to use unregistered theme '"+e+"'. Register it with $mdThemingProvider.theme().");var t=n.data("$mdThemeName");t&&n.removeClass("md-"+t+"-theme"),n.addClass("md-"+e+"-theme"),n.data("$mdThemeName",e),o&&n.data("$mdThemeController",o)}}},i.registered=c,i.defaultTheme=function(){return p},i.generateTheme=function(e){T(m[e],e,y.nonce)},i.defineTheme=function(e,t){t=t||{};var n=r(e);return t.primary&&n.primaryPalette(t.primary,t.primaryHues),t.accent&&n.accentPalette(t.accent,t.accentHues),t.warn&&n.warnPalette(t.warn,t.warnHues),t.background&&n.backgroundPalette(t.background,t.backgroundHues),t.dark&&n.dark(),this.generateTheme(e),o.resolve(e)},i.setBrowserColor=t,i;function c(e){return e===se||""===e||i.THEMES[e]!==se}}}function n(p,h,f,g,b,v){return{priority:101,link:{pre:function(t,e,n){var o=[],i=h.startSymbol(),r=h.endSymbol(),a=n.mdTheme.trim(),d=a.substr(0,i.length)===i&&a.lastIndexOf(r)===a.length-r.length,s="::"===n.mdTheme.split(i).join("").split(r).join("").trim().substr(0,"::".length),l=function(){var e=h(n.mdTheme)(t);return f(e)(t)||e},c={isAsyncTheme:E.isFunction(l())||E.isFunction(l().then),registerChanges:function(t,e){return e&&(t=E.bind(e,t)),o.push(t),function(){var e=o.indexOf(t);-1<e&&o.splice(e,1)}},$setTheme:function(e){p.registered(e)||v.warn("attempted to use unregistered theme '"+e+"'"),c.$mdTheme=e;for(var t=o.length;t--;)o[t](e)},$shouldWatch:g.parseAttributeBoolean(e.attr("md-theme-watch"))||p.ALWAYS_WATCH||d&&!s};e.data("$mdThemeController",c);var m=function(e){if("string"==typeof e)return c.$setTheme(e);b.when(E.isFunction(e)?e():e).then(function(e){c.$setTheme(e)})};m(l());var u=t.$watch(l,function(e){e&&(m(e),c.$shouldWatch||u())})}}}}function o(e){return e}function C(d,e,t){!function(e,t){if(!h[(e.colors[t]||{}).name])throw new Error("You supplied an invalid color palette for theme %1's %2 palette. Available palettes: %3".replace("%1",e.name).replace("%2",t).replace("%3",Object.keys(h).join(", ")))}(d,e),t=t.replace(/THEME_NAME/g,d.name);var n=new RegExp("\\.md-"+d.name+"-theme","g");t=t.replace(/'?"?\{\{\s*([a-zA-Z]+)-(A?\d+|hue-[0-3]|shadow|default)-?(\d\.?\d*)?(contrast)?\s*\}\}'?"?/g,function(e,t,n,o,i){return"foreground"===t?"shadow"==n?d.foregroundShadow:d.foregroundPalette[n]||d.foregroundPalette[1]:(0!==n.indexOf("hue")&&"default"!==n||(n=d.colors[t].hues[n]),w((h[d.colors[t].name][n]||"")[i?"contrast":"value"],o))});var o=new RegExp("('|\")?{{\\s*([a-zA-Z]+)-(color|contrast)-?(\\d\\.?\\d*)?\\s*}}(\"|')?","g"),i=[];
vendor: 22,161 bytes, line 10510
10510return E.forEach(["default","hue-1","hue-2","hue-3"],function(a){var e=t.replace(o,function(e,t,n,o,i){var r=d.colors[n];return w(h[r.name][r.hues[a]]["color"===o?"value":"contrast"],i)});"default"!==a&&(e=e.replace(n,".md-"+d.name+"-theme.md-"+a)),"default"==d.name&&(e=e.replace(/((?:\s|>|\.|\w|-|:|\(|\)|\[|\]|"|'|=)*)\.md-default-theme((?:\s|>|\.|\w|-|:|\(|\)|\[|\]|"|'|=)*)/g,function(e,t,n){return e+", "+t+n})),i.push(e)}),i}var M={};function i(e,t){var n=document.head,o=n?n.firstElementChild:null,i=!y.disableTheming&&e.has("$MD_THEME_CSS")?e.get("$MD_THEME_CSS"):"";if(i+=y.registeredStyles.join(""),o&&0!==i.length){E.forEach(h,function(o,e){var i=o.contrastDefaultColor,r=o.contrastLightColors||[],a=o.contrastStrongLightColors||[],d=o.contrastDarkColors||[];"string"==typeof r&&(r=r.split(" ")),"string"==typeof a&&(a=a.split(" ")),"string"==typeof d&&(d=d.split(" ")),delete o.contrastDefaultColor,delete o.contrastLightColors,delete o.contrastStrongLightColors,delete o.contrastDarkColors,E.forEach(o,function(e,t){if(!E.isObject(e)){var n=A(e);if(!n)throw new Error("Color %1, in palette %2's hue %3, is invalid. Hex or rgb(a) color expected.".replace("%1",e).replace("%2",o.name).replace("%3",t));o[t]={hex:o[t],value:n,contrast:"light"===i?-1<d.indexOf(t)?m:-1<a.indexOf(t)?p:u:-1<r.indexOf(t)?-1<a.indexOf(t)?p:u:m}}})});var r=i.split(/\}(?!(\}|'|"|;))/).filter(function(e){return e&&e.trim().length}).map(function(e){return e.trim()+"}"});g.forEach(function(e){M[e]=""}),r.forEach(function(e){for(var t,n=0;t=g[n];n++)if(-1<e.indexOf(".md-"+t))return M[t]+=e;for(n=0;t=g[n];n++)if(-1<e.indexOf(t))return M[t]+=e;return M[a]+=e}),y.generateOnDemand||E.forEach(t.THEMES,function(e){s[e.name]||"default"!==t.defaultTheme()&&"default"===e.name||T(e,e.name,y.nonce)})}}function T(i,e,r){var a=document.head,d=a?a.firstElementChild:null;s[e]||(g.forEach(function(e){for(var t=C(i,e,M[e]);t.length;){var n=t.shift();if(n){var o=document.createElement("style");o.setAttribute("md-theme-style",""),r&&o.setAttribute("nonce",r),o.appendChild(document.createTextNode(n)),a.insertBefore(o,d)}}}),s[i.name]=!0)}function A(e){if(E.isArray(e)&&3==e.length)return e;if(/^rgb/.test(e))return e.replace(/(^\s*rgba?\(|\)\s*$)/g,"").split(",").map(function(e,t){return 3==t?parseFloat(e,10):parseInt(e,10)});if("#"==e.charAt(0)&&(e=e.substring(1)),/^([a-fA-F0-9]{3}){1,2}$/g.test(e)){var t=e.length/3,n=e.substr(0,t),o=e.substr(t,t),i=e.substr(2*t);return 1===t&&(n+=n,o+=o,i+=i),[parseInt(n,16),parseInt(o,16),parseInt(i,16)]}}function w(e,t){return e?(4==e.length&&(e=E.copy(e),t?e.pop():t=e.pop()),t&&("number"==typeof t||"string"==typeof t&&t.length)?"rgba("+e.join(",")+","+t+")":"rgb("+e.join(",")+")"):"rgb('0,0,0')"}}(B.angular),function(){function e(i){return{attach:function(e,t,n){var o;return n=de.extend((o=t).hasClass("md-icon-button")?{isMenuItem:o.hasClass("md-menu-item"),fitRipple:!0,center:!0}:{isMenuItem:o.hasClass("md-menu-item"),dimBackground:!0},n),i.attach(e,t,n)}}}e.$inject=["$mdInkRipple"],de.module("material.core").factory("$mdButtonInkRipple",e)}(),function(){function e(o){return{attach:function(e,t,n){return o.attach(e,t,de.extend({center:!0,dimBackground:!1,fitRipple:!0},n))}}}e.$inject=["$mdInkRipple"],de.module("material.core").factory("$mdCheckboxInkRipple",e)}(),function(){function e(o){return{attach:function(e,t,n){return o.attach(e,t,de.extend({center:!1,dimBackground:!0,outline:!1,rippleSize:"full"},n))}}}e.$inject=["$mdInkRipple"],de.module("material.core").factory("$mdListInkRipple",e)}(),function(){r.$inject=["$scope","$element","rippleOptions","$window","$timeout","$mdUtil","$mdColorUtil"],e.$inject=["$mdButtonInkRipple","$mdCheckboxInkRipple"],de.module("material.core").provider("$mdInkRipple",function(){var i=!1;return{disableInkRipple:function(){i=!0},$get:["$injector",function(o){return{attach:function(e,t,n){return i||t.controller("mdNoInk")?de.noop:o.instantiate(r,{$scope:e,$element:t,rippleOptions:n})}}}]}}).directive("mdInkRipple",e).directive("mdNoInk",n).directive("mdNoBar",n).directive("mdNoStretch",n);function e(o,i){return{controller:de.noop,link:function(e,t,n){n.hasOwnProperty("mdInkRippleCheckbox")?i.attach(e,t):o.attach(e,t)}}}function r(e,t,n,o,i,r,a){this.$window=o,this.$timeout=i,this.$mdUtil=r,this.$mdColorUtil=a,this.$scope=e,this.$element=t,this.options=n,this.mousedown=!1,this.ripples=[],this.timeout=null,this.lastRipple=null,r.valueOnUse(this,"container",this.createContainer),this.$element.addClass("md-ink-ripple"),(t.controller("mdInkRipple")||{}).createRipple=de.bind(this,this.createRipple),(t.controller("mdInkRipple")||{}).setColor=de.bind(this,this.color),this.bindEvents()}function t(e,t){(e.mousedown||e.lastRipple)&&(e.mousedown=!1,e.$mdUtil.nextTick(de.bind(e,t),!1))}function n(){return{controller:de.noop}}r.prototype.color=function(e){var t,n,o=this;return de.isDefined(e)&&(o._color=o._parseColor(e)),o._color||o._parseColor(o.inkRipple())||o._parseColor((t=o.options&&o.options.colorElement?o.options.colorElement:[],(n=t.length?t[0]:o.$element[0])?o.$window.getComputedStyle(n).color:"rgb(0,0,0)"))},r.prototype.calculateColor=function(){return this.color()},r.prototype._parseColor=function(e,t){t=t||1;var n=this.$mdColorUtil;if(e)return 0===e.indexOf("rgba")?e.replace(/\d?\.?\d*\s*\)\s*$/,(.1*t).toString()+")"):0===e.indexOf("rgb")?n.rgbToRgba(e):0===e.indexOf("#")?n.hexToRgba(e):void 0},r.prototype.bindEvents=function(){this.$element.on("mousedown",de.bind(this,this.handleMousedown)),this.$element.on("mouseup touchend",de.bind(this,this.handleMouseup)),this.$element.on("mouseleave",de.bind(this,this.handleMouseup)),this.$element.on("touchmove",de.bind(this,this.handleTouchmove))},r.prototype.handleMousedown=function(e){if(!this.mousedown)if(e.hasOwnProperty("originalEvent")&&(e=e.originalEvent),this.mousedown=!0,this.options.center)this.createRipple(this.container.prop("clientWidth")/2,this.container.prop("clientWidth")/2);else if(e.srcElement!==this.$element[0]){var t=this.$element[0].getBoundingClientRect(),n=e.clientX-t.left,o=e.clientY-t.top;this.createRipple(n,o)}else this.createRipple(e.offsetX,e.offsetY)},r.prototype.handleMouseup=function(){this.$timeout(function(){t(this,this.clearRipples)}.bind(this))},r.prototype.handleTouchmove=function(){t(this,this.deleteRipples)},r.prototype.deleteRipples=function(){for(var e=0;e<this.ripples.length;e++)this.ripples[e].remove()},r.prototype.clearRipples=function(){for(var e=0;e<this.ripples.length;e++)this.fadeInComplete(this.ripples[e])},r.prototype.createContainer=function(){var e=de.element('<div class="md-ripple-container"></div>');return this.$element.append(e),e},r.prototype.clearTimeout=function(){this.timeout&&(this.$timeout.cancel(this.timeout),this.timeout=null)},r.prototype.isRippleAllowed=function(){var e=this.$element[0];do{if(!e.tagName||"BODY"===e.tagName)break;if(e&&de.isFunction(e.hasAttribute)){if(e.hasAttribute("disabled"))return!1;if("false"===this.inkRipple()||"0"===this.inkRipple())return!1}}while(e=e.parentNode);return!0},r.prototype.inkRipple=function(){return this.$element.attr("md-ink-ripple")},r.prototype.createRipple=function(e,t){if(this.isRippleAllowed()){var n,o,i,r=this,a=r.$mdColorUtil,d=de.element('<div class="md-ripple"></div>'),s=this.$element.prop("clientWidth"),l=this.$element.prop("clientHeight"),c=2*Math.max(Math.abs(s-e),e),m=2*Math.max(Math.abs(l-t),t),u=(n=this.options.fitRipple,o=c,i=m,n?Math.max(o,i):Math.sqrt(Math.pow(o,2)+Math.pow(i,2))),p=this.calculateColor();d.css({left:e+"px",top:t+"px",background:"black",width:u+"px",height:u+"px",backgroundColor:a.rgbaToRgb(p),borderColor:a.rgbaToRgb(p)}),this.lastRipple=d,this.clearTimeout(),this.timeout=this.$timeout(function(){r.clearTimeout(),r.mousedown||r.fadeInComplete(d)},157.5,!1),this.options.dimBackground&&this.container.css({backgroundColor:p}),this.container.append(d),this.ripples.push(d),d.addClass("md-ripple-placed"),this.$mdUtil.nextTick(function(){d.addClass("md-ripple-scaled md-ripple-active"),r.$timeout(function(){r.clearRipples()},450,!1)},!1)}},r.prototype.fadeInComplete=function(e){this.lastRipple===e&&(this.timeout||this.mousedown)||this.removeRipple(e)},r.prototype.removeRipple=function(e){var t=this;this.ripples.indexOf(e)<0||(this.ripples.splice(this.ripples.indexOf(e),1),e.removeClass("md-ripple-active"),e.addClass("md-ripple-remove"),0===this.ripples.length&&this.container.css({backgroundColor:""}),this.$timeout(function(){t.fadeOutComplete(e)},450,!1))},r.prototype.fadeOutComplete=function(e){e.remove(),this.lastRipple=null}}(),function(){function e(o){return{attach:function(e,t,n){return o.attach(e,t,de.extend({center:!1,dimBackground:!0,outline:!1,rippleSize:"full"},n))}}}e.$inject=["$mdInkRipple"],de.module("material.core").factory("$mdTabInkRipple",e)}(),de.module("material.core").factory("$$mdAnimate",["$q","$timeout","$mdConstant","$animateCss",function(n,i,a,d){return function(e){return o=e,t=n,s=i,l=a,r=d,c={translate3d:function(t,n,e,o){return r(t,{from:n,to:e,addClass:o.transitionInClass,removeClass:o.transitionOutClass,duration:o.duration}).start().then(function(){return i});function i(e){return r(t,{to:e||n,addClass:o.transitionOutClass,removeClass:o.transitionInClass,duration:o.duration}).start()}},waitTransitionEnd:function(r,a){var d=3e3;return t(function(t,e){var n;("0s"==(n=(n=(a=a||{}).cachedTransitionStyles)||B.getComputedStyle(r[0])).transitionDuration||!n.transition&&!n.transitionProperty)&&(d=0);var o=s(i,a.timeout||d);function i(e){e&&e.target!==r[0]||(e&&s.cancel(o),r.off(l.CSS.TRANSITIONEND,i),t())}r.on(l.CSS.TRANSITIONEND,i)})},calculateTransformValues:function(e,t){var n,o,i=t.element,r=t.bounds;if(i||r){var a=i?c.clientRect(i)||(n=e?e.parent():null,(o=n?n.parent():null)?c.clientRect(o):null):c.copyRect(r),d=c.copyRect(e[0].getBoundingClientRect()),s=c.centerPointFor(d),l=c.centerPointFor(a);return{centerX:l.x-s.x,centerY:l.y-s.y,scaleX:Math.round(100*Math.min(.5,a.width/d.width))/100,scaleY:Math.round(100*Math.min(.5,a.height/d.height))/100}}return{centerX:0,centerY:0,scaleX:.5,scaleY:.5}},calculateZoomToOrigin:function(e,t){var n=de.bind(null,o.supplant,"translate3d( {centerX}px, {centerY}px, 0 ) scale( {scaleX}, {scaleY} )");return n(c.calculateTransformValues(e,t))},calculateSlideToOrigin:function(e,t){var n=de.bind(null,o.supplant,"translate3d( {centerX}px, {centerY}px, 0 )");return n(c.calculateTransformValues(e,t))},toCss:function(e){var o={};return de.forEach(e,function(e,t){if(!de.isUndefined(e))if(0<="left top right bottom width height x y min-width min-height max-width max-height".indexOf(t))o[t]=e+"px";else switch(t){case"transition":n(t,l.CSS.TRANSITION,e);break;case"transform":n(t,l.CSS.TRANSFORM,e);break;case"transformOrigin":n(t,l.CSS.TRANSFORM_ORIGIN,e);break;case"font-size":o["font-size"]=e}}),o;function n(e,t,n){de.forEach(t.split(" "),function(e){o[e]=n})}},toTransformCss:function(t,e,n){var o={};return de.forEach(l.CSS.TRANSFORM.split(" "),function(e){o[e]=t}),e&&(n=n||"all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important",o.transition=n),o},copyRect:function(t,n){return t?(n=n||{},de.forEach("left top right bottom width height".split(" "),function(e){n[e]=Math.round(t[e])}),n.width=n.width||n.right-n.left,n.height=n.height||n.bottom-n.top,n):null},clientRect:function(e){var t,n=de.element(e)[0].getBoundingClientRect();return(t=n)&&0<t.width&&0<t.height?c.copyRect(n):null},centerPointFor:function(e){return e?{x:Math.round(e.left+e.width/2),y:Math.round(e.top+e.height/2)}:{x:0,y:0}}};var o,t,s,l,r,c}}]),4<=de.version.minor?de.module("material.core.animate",[]):function(){var A=de.forEach,w=de.isDefined(document.documentElement.style.WebkitAppearance),_=w?"-webkit-":"",k=(w?"webkitTransitionEnd ":"")+"transitionend",x=(w?"webkitAnimationEnd ":"")+"animationend",e=["$q","$$rAFMutex",function(t,n){function e(e){this.setHost(e),this._doneCallbacks=[],this._runInAnimationFrame=n(),this._state=0}return e.prototype={setHost:function(e){this.host=e||{}},done:function(e){2===this._state?e():this._doneCallbacks.push(e)},progress:de.noop,getPromise:function(){if(!this.promise){var e=this;this.promise=t(function(t,n){e.done(function(e){!1===e?n():t()})})}return this.promise},then:function(e,t){return this.getPromise().then(e,t)},catch:function(e){return this.getPromise().catch(e)},finally:function(e){return this.getPromise().finally(e)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end(),this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel(),this._resolve(!1)},complete:function(e){var t=this;0===t._state&&(t._state=1,t._runInAnimationFrame(function(){t._resolve(e)}))},_resolve:function(t){2!==this._state&&(A(this._doneCallbacks,function(e){e(t)}),this._doneCallbacks.length=0,this._state=2)}},e.all=function(t,n){var o=0,i=!0;function r(e){i=i&&e,++o===t.length&&n(i)}A(t,function(e){e.done(r)})},e}];function N(e){return e.replace(/-[a-z]/g,function(e){return e.charAt(1).toUpperCase()})}de.module("material.core.animate",[]).factory("$$forceReflow",["$document",function(e){return function(){return e[0].body.clientWidth+1}}]).factory("$$AnimateRunner",e).factory("$$rAFMutex",["$$rAF",function(n){return function(){var t=!1;return n(function(){t=!0}),function(e){t?e():n(e)}}}]).factory("$animateCss",["$window","$$rAF","$$AnimateRunner","$$forceReflow","$$jqLite","$timeout","$animate",function(h,r,a,f,n,g,d){function b(e,t){t.addClass&&(n.addClass(e,t.addClass),t.addClass=null),t.removeClass&&(n.removeClass(e,t.removeClass),t.removeClass=null)}function v(e){var t=0,n=(e||"").split(/\s*,\s*/);return A(n,function(e){"s"==e.charAt(e.length-1)&&(e=e.substring(0,e.length-1)),e=parseFloat(e)||0,t=t?Math.max(e,t):e}),t}var E,$=[];function y(e,t){t.from&&(e.css(t.from),t.from=null)}function C(e,t){t.to&&(e.css(t.to),t.to=null)}function M(e){for(var t=0;t<e.length;t++)if(1===e[t].nodeType)return e[t]}function T(e,t){var n=M(e),o=N(_+"transition-delay");n.style[o]=t?"-9999s":""}return function(o,s){var l=[],c=M(o),e=c&&d.enabled(),t=!1,n=!1;e&&(s.transitionStyle&&l.push([_+"transition",s.transitionStyle]),s.keyframeStyle&&l.push([_+"animation",s.keyframeStyle]),s.delay&&l.push([_+"transition-delay",s.delay+"s"]),s.duration&&l.push([_+"transition-duration",s.duration+"s"]),t=s.keyframeStyle||s.to&&(0<s.duration||s.transitionStyle),n=!!s.addClass||!!s.removeClass,T(o,!0));var m=e&&(t||n);y(o,s);var u,p,i=!1;return{close:h.close,start:function(){var e,n=new a;return e=function(){if(T(o,!1),!m)return d();A(l,function(e){var t=e[0],n=e[1];c.style[N(t)]=n}),b(o,s);var e=function(e){var t=M(e),n=h.getComputedStyle(t),o=v(n[l("transitionDuration")]),i=v(n[l("animationDuration")]),r=v(n[l("transitionDelay")]),a=v(n[l("animationDelay")]);i*=parseInt(n[l("animationIterationCount")],10)||1;var d=Math.max(i,o),s=Math.max(a,r);return{duration:d,delay:s,animationDuration:i,transitionDuration:o,animationDelay:a,transitionDelay:r};function l(e){return w?"Webkit"+e.charAt(0).toUpperCase()+e.substr(1):e}}(o);if(0===e.duration)return d();var t=[];s.easing&&(e.transitionDuration&&t.push([_+"transition-timing-function",s.easing]),e.animationDuration&&t.push([_+"animation-timing-function",s.easing])),s.delay&&e.animationDelay&&t.push([_+"animation-delay",s.delay+"s"]),s.duration&&e.animationDuration&&t.push([_+"animation-duration",s.duration+"s"]),A(t,function(e){var t=e[0],n=e[1];c.style[N(t)]=n,l.push(e)});var i=1e3*e.delay,r=e.duration,n=1e3*r,a=Date.now();u=[],e.transitionDuration&&u.push(k),e.animationDuration&&u.push(x),u=u.join(" "),p=function(e){e.stopPropagation();var t=e.originalEvent||e,n=t.timeStamp||Date.now(),o=parseFloat(t.elapsedTime.toFixed(3));Math.max(n-a,0)>=i&&r<=o&&d()},o.on(u,p),C(o,s),g(d,i+1.5*n,!1)},E&&E(),$.push(e),E=r(function(){E=null;for(var e=f(),t=0;t<$.length;t++)$[t](e);$.length=0}),n;function d(){var e,t;if(!i)return i=!0,u&&p&&o.off(u,p),b(o,s),y(e=o,t=s),C(e,t),A(l,function(e){c.style[N(e[0])]=""}),n.complete(!0),n}}}}}])}(),de.module("material.components.autocomplete",["material.core","material.components.icon","material.components.virtualRepeat"]),de.module("material.components.backdrop",["material.core"]).directive("mdBackdrop",["$mdTheming","$mdUtil","$animate","$rootElement","$window","$log","$$rAF","$document",function(d,s,t,n,l,c,m,u){return{restrict:"E",link:function(o,i,e){var r;function a(){var e=parseInt(r.height,10)+Math.abs(parseInt(r.top,10));i.css("height",e+"px")}t.pin&&t.pin(i,n),m(function(){if("fixed"===(r=l.getComputedStyle(u[0].body)).position){var e=s.debounce(function(){r=l.getComputedStyle(u[0].body),a()},60,null,!1);a(),de.element(l).on("resize",e),o.$on("$destroy",function(){de.element(l).off("resize",e)})}var t=i.parent();if(t.length){"BODY"===t[0].nodeName&&i.css("position","fixed");var n=l.getComputedStyle(t[0]);"static"===n.position&&c.warn("<md-backdrop> may not work properly in a scrolled, static-positioned parent container."),d.inherit(i,t)}})}}}]),function(){function e(n){return{restrict:"E",link:function(e,t){t.addClass("_md"),e.$on("$destroy",function(){n.destroy()})}}}function t(e){t.$inject=["$animate","$mdConstant","$mdUtil","$mdTheming","$mdBottomSheet","$rootElement","$mdGesture","$log"];var p=.5,h=80;return e("$mdBottomSheet").setDefaults({methods:["disableParentScroll","escapeToClose","clickOutsideToClose"],options:t});function t(i,a,d,r,s,l,c,m){var u;return{themable:!0,onShow:function(e,t,n,o){if((t=d.extractElementByName(t,"md-bottom-sheet")).attr("tabindex","-1"),t.hasClass("ng-cloak")){m.warn("$mdBottomSheet: using `<md-bottom-sheet ng-cloak>` will affect the bottom-sheet opening animations.",t[0])}n.isLockedOpen?(n.clickOutsideToClose=!1,n.escapeToClose=!1):n.cleanupGestures=function(o,e){var t=c.register(e,"drag",{horizontal:!1});return e.on("$md.dragstart",n).on("$md.drag",i).on("$md.dragend",r),function(){t(),e.off("$md.dragstart",n),e.off("$md.drag",i),e.off("$md.dragend",r)};function n(){o.css(a.CSS.TRANSITION_DURATION,"0ms")}function i(e){var t=e.pointer.distanceY;t<5&&(t=Math.max(-h,t/2)),o.css(a.CSS.TRANSFORM,"translate3d(0,"+(h+t)+"px,0)")}function r(e){if(0<e.pointer.distanceY&&(20<e.pointer.distanceY||Math.abs(e.pointer.velocityY)>p)){var t=o.prop("offsetHeight")-e.pointer.distanceY,n=Math.min(t/e.pointer.velocityY*.75,500);o.css(a.CSS.TRANSITION_DURATION,n+"ms"),d.nextTick(s.cancel,!0)}else o.css(a.CSS.TRANSITION_DURATION,""),o.css(a.CSS.TRANSFORM,"")}}(t,n.parent);n.disableBackdrop||((u=d.createBackdrop(e,"md-bottom-sheet-backdrop md-opaque"))[0].tabIndex=-1,n.clickOutsideToClose&&u.on("click",function(){d.nextTick(s.cancel,!0)}),r.inherit(u,n.parent),i.enter(u,n.parent,null));r.inherit(t,n.parent),n.disableParentScroll&&(n.restoreScroll=d.disableScrollAround(t,n.parent));return i.enter(t,n.parent,u).then(function(){var e=d.findFocusTarget(t)||de.element(t[0].querySelector("button")||t[0].querySelector("a")||t[0].querySelector(d.prefixer("ng-click",!0)))||u;n.escapeToClose&&(n.rootElementKeyupCallback=function(e){e.keyCode===a.KEY_CODE.ESCAPE&&d.nextTick(s.cancel,!0)},l.on("keyup",n.rootElementKeyupCallback),e&&e.focus())})},onRemove:function(e,t,n){n.disableBackdrop||i.leave(u);return i.leave(t).then(function(){n.disableParentScroll&&(n.restoreScroll(),delete n.restoreScroll),n.cleanupGestures&&n.cleanupGestures()})},disableBackdrop:!1,escapeToClose:!0,clickOutsideToClose:!0,disableParentScroll:!0,isLockedOpen:!1}}}e.$inject=["$mdBottomSheet"],t.$inject=["$$interimElementProvider"],de.module("material.components.bottomSheet",["material.core","material.components.backdrop"]).directive("mdBottomSheet",e).provider("$mdBottomSheet",t)}(),function(){function e(n){return{restrict:"E",link:function(e,t){n(t)}}}function t(o,i,r,a){return{restrict:"EA",replace:!0,transclude:!0,template:function(e,t){{if(d(t))return'<a class="md-button" ng-transclude></a>';var n=void 0===t.type?"button":t.type;return'<button class="md-button" type="'+n+'" ng-transclude></button>'}},link:function(e,t,n){i(t),o.attach(e,t),r.expectWithoutText(t,"aria-label"),d(n)&&de.isDefined(n.ngDisabled)&&e.$watch(n.ngDisabled,function(e){t.attr("tabindex",e?-1:0)});t.on("click",function(e){!0===n.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),t.hasClass("md-no-focus")||(t.on("focus",function(){a.isUserInvoked()&&"keyboard"!==a.getLastInteractionType()||t.addClass("md-focused")}),t.on("blur",function(){t.removeClass("md-focused")}))}};function d(e){return de.isDefined(e.href)||de.isDefined(e.ngHref)||de.isDefined(e.ngLink)||de.isDefined(e.uiSref)}}t.$inject=["$mdButtonInkRipple","$mdTheming","$mdAria","$mdInteraction"],e.$inject=["$mdTheming"],de.module("material.components.button",["material.core"]).directive("mdButton",t).directive("a",e)}(),function(){function e(o){return{restrict:"E",link:function(e,t,n){t.addClass("_md"),o(t)}}}e.$inject=["$mdTheming"],de.module("material.components.card",["material.core"]).directive("mdCard",e)}(),function(){function e(h,f,g,b,v,E){return h=h[0],{restrict:"E",transclude:!0,require:["^?mdInputContainer","?ngModel","?^form"],priority:g.BEFORE_NG_ARIA,template:'<div class="md-container" md-ink-ripple md-ink-ripple-checkbox><div class="md-icon"></div></div><div ng-transclude class="md-label"></div>',compile:function(e,t){return t.$set("tabindex",t.tabindex||"0"),t.$set("type","checkbox"),t.$set("role",t.type),{pre:function(e,t){t.on("click",function(e){this.hasAttribute("disabled")&&e.stopImmediatePropagation()})},post:function(e,n,o,t){var i,r,a,d,s=t[0],l=t[1]||v.fakeNgModel(),c=t[2];if(s){var m=s.isErrorGetter||function(){return l.$invalid&&(l.$touched||c&&c.$submitted)};s.input=n,e.$watch(m,s.setInvalid)}function u(t){n[0].hasAttribute("disabled")||e.skipToggle||e.$apply(function(){var e=o.ngChecked&&o.ngClick?o.checked:!l.$viewValue;l.$setViewValue(e,t&&t.type),l.$render()})}function p(e){(i=!1!==e)&&n.attr("aria-checked","mixed"),n.toggleClass("md-indeterminate",i)}b(n),n.children().on("focus",function(){n.focus()}),v.parseAttributeBoolean(o.mdIndeterminate)&&(p(),e.$watch(o.mdIndeterminate,p)),o.ngChecked&&e.$watch(e.$eval.b
10510ind(e,o.ngChecked),function(e){l.$setViewValue(e),l.$render()}),r="ngDisabled",a="tabindex",d={true:"-1",false:o.tabindex},o[r]&&e.$watch(o[r],function(e){d[e]&&n.attr(a,d[e])}),h.link.pre(e,{on:de.noop,0:{}},o,[l]),n.on("click",u).on("keypress",function(e){var t=e.which||e.keyCode;t!==g.KEY_CODE.SPACE&&t!==g.KEY_CODE.ENTER||(e.preventDefault(),n.addClass("md-focused"),u(e))}).on("focus",function(){"keyboard"===E.getLastInteractionType()&&n.addClass("md-focused")}).on("blur",function(){n.removeClass("md-focused")}),l.$render=function(){n.toggleClass("md-checked",!!l.$viewValue&&!i)}}}}}}e.$inject=["inputDirective","$mdAria","$mdConstant","$mdTheming","$mdUtil","$mdInteraction"],de.module("material.components.checkbox",["material.core"]).directive("mdCheckbox",e)}(),de.module("material.components.chips",["material.core","material.components.autocomplete"]),function(){t.$inject=["$mdColors","$mdUtil","$log","$parse"],e.$inject=["$mdTheming","$mdUtil","$log"];var a=/^{((\s|,)*?["'a-zA-Z-]+?\s*?:\s*?('|")[a-zA-Z0-9-.]*('|"))+\s*}$/,l=null;function e(r,a,o){return l=l||Object.keys(r.PALETTES),{applyThemeColors:function(e,t){try{t&&e.css((i={},r=(n=t).hasOwnProperty("color"),de.forEach(n,function(e,t){var n=s(e),o=-1<t.indexOf("background");i[t]=d(n),o&&!r&&(i.color=d(n,!0))}),i))}catch(e){o.error(e.message)}var n,i,r},getThemeColor:function(e){return d(s(e))},hasTheme:function(e){return de.isDefined(r.THEMES[e.split("-")[0]])}};function d(e,t){t=t||!1;var n=r.PALETTES[e.palette][e.hue];return n=t?n.contrast:n.value,a.supplant("rgba({0}, {1}, {2}, {3})",[n[0],n[1],n[2],n[3]||e.opacity])}function s(e){var t=e.split("-"),n=de.isDefined(r.THEMES[t[0]])?t.splice(0,1)[0]:r.defaultTheme();return{theme:n,palette:function(e,t){var n=1<e.length&&-1!==l.indexOf(e[1]),o=e[0].replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();if(n&&(o=e[0]+"-"+e.splice(1,1)),-1===l.indexOf(o)){var i=r.THEMES[t].colors[o];if(!i)throw new Error(a.supplant("mdColors: couldn't find '{palette}' in the palettes.",{palette:o}));o=i.name}return o}(t,n),hue:function(e,t){var n=r.THEMES[t].colors;if("hue"===e[1]){var o=parseInt(e.splice(2,1)[0],10);if(o<1||3<o)throw new Error(a.supplant("mdColors: 'hue-{hueNumber}' is not a valid hue, can be only 'hue-1', 'hue-2' and 'hue-3'",{hueNumber:o}));if(e[1]="hue-"+o,!(e[0]in n))throw new Error(a.supplant("mdColors: 'hue-x' can only be used with [{availableThemes}], but was used with '{usedTheme}'",{availableThemes:Object.keys(n).join(", "),usedTheme:e[0]}));return n[e[0]].hues[e[1]]}return e[1]||n[e[0]in n?e[0]:"primary"].hues.default}(t,n),opacity:t[2]||1}}}function t(c,r,m,u){return{restrict:"A",require:["^?mdTheme"],compile:function(e,i){var l=function(){var e=i.mdColors,t=-1<e.indexOf("::"),n=!!t||a.test(i.mdColors);i.mdColors=e.replace("::","");var o=de.isDefined(i.mdColorsWatch);return!t&&!n&&(!o||r.parseAttributeBoolean(i.mdColorsWatch))}();return function(e,n,t,o){var i=o[0],r={},a=function(n){"string"!=typeof n&&(n=""),t.mdColors||(t.mdColors="{}");var o=u(t.mdColors)(e);return i&&Object.keys(o).forEach(function(e){var t=o[e];c.hasTheme(t)||(o[e]=(n||i.$mdTheme)+"-"+t)}),d(o),o},d=function(e){if(!de.equals(e,r)){var t=Object.keys(r);r.background&&!t.color&&t.push("color"),t.forEach(function(e){n.css(e,"")})}r=e},s=de.noop;i&&(s=i.registerChanges(function(e){c.applyThemeColors(n,a(e))})),e.$on("$destroy",function(){s()});try{l?e.$watch(a,de.bind(this,c.applyThemeColors,n),!0):c.applyThemeColors(n,a())}catch(e){m.error(e.message)}}}}}de.module("material.components.colors",["material.core"]).directive("mdColors",t).service("$mdColors",e)}(),function(){function e(o){return{restrict:"E",controller:["$scope","$element",function(e,t){this.$scope=e,this.$element=t}],link:function(e,t){var n;t.addClass("_md"),o(t),e.$broadcast("$mdContentLoaded",t),n=t[0],de.element(n).on("$md.pressdown",function(e){"t"===e.pointer.type&&(e.$materialScrollFixed||(e.$materialScrollFixed=!0,0===n.scrollTop?n.scrollTop=1:n.scrollHeight===n.scrollTop+n.offsetHeight&&(n.scrollTop-=1)))})}}}
vendor: 7,370 bytes, line 10510
10510e.$inject=["$mdTheming"],de.module("material.components.content",["material.core"]).directive("mdContent",e)}(),de.module("material.components.datepicker",["material.core","material.components.icon","material.components.virtualRepeat"]),function(){function e(e,t,r){return{restrict:"E",link:function(o,i){i.addClass("_md"),t(i),e(function(){var e,t=i[0].querySelector("md-dialog-content");function n(){i.toggleClass("md-content-overflow",t.scrollHeight>t.clientHeight)}t&&(e=t.getElementsByTagName("img"),n(),de.element(e).on("load",n)),o.$on("$destroy",function(){r.destroy(i)})})}}}function t(e){var $,y;return n.$inject=["$mdDialog","$mdConstant"],o.$inject=["$mdDialog","$mdAria","$mdUtil","$mdConstant","$animate","$document","$window","$rootElement","$log","$injector","$mdTheming","$interpolate","$mdInteraction"],e("$mdDialog").setDefaults({methods:["disableParentScroll","hasBackdrop","clickOutsideToClose","escapeToClose","targetEvent","closeTo","openFrom","parent","fullscreen","multiple"],options:o}).addPreset("alert",{methods:["title","htmlContent","textContent","content","ariaLabel","ok","theme","css"],options:t}).addPreset("confirm",{methods:["title","htmlContent","textContent","content","ariaLabel","ok","cancel","theme","css"],options:t}).addPreset("prompt",{methods:["title","htmlContent","textContent","initialValue","content","placeholder","ariaLabel","ok","cancel","theme","css","required"],options:t});function t(){return{template:['<md-dialog md-theme="{{ dialog.theme || dialog.defaultTheme }}" aria-label="{{ dialog.ariaLabel }}" ng-class="dialog.css">',' <md-dialog-content class="md-dialog-content" role="document" tabIndex="-1">',' <h2 class="md-title">{{ dialog.title }}</h2>',' <div ng-if="::dialog.mdHtmlContent" class="md-dialog-content-body" ',' ng-bind-html="::dialog.mdHtmlContent"></div>',' <div ng-if="::!dialog.mdHtmlContent" class="md-dialog-content-body">'," <p>{{::dialog.mdTextContent}}</p>"," </div>",' <md-input-container md-no-float ng-if="::dialog.$type == \'prompt\'" class="md-prompt-input-container">',' <input ng-keypress="dialog.keypress($event)" md-autofocus ng-model="dialog.result" placeholder="{{::dialog.placeholder}}" ng-required="dialog.required">'," </md-input-container>"," </md-dialog-content>"," <md-dialog-actions>",' <md-button ng-if="dialog.$type === \'confirm\' || dialog.$type === \'prompt\'" ng-click="dialog.abort()" class="md-primary md-cancel-button">'," {{ dialog.cancel }}"," </md-button>",' <md-button ng-click="dialog.hide()" class="md-primary md-confirm-button" md-autofocus="dialog.$type===\'alert\'" ng-disabled="dialog.required && !dialog.result">'," {{ dialog.ok }}"," </md-button>"," </md-dialog-actions>","</md-dialog>"].join("").replace(/\s\s+/g,""),controller:n,controllerAs:"dialog",bindToController:!0}}function n(o,i){this.$onInit=function(){var n="prompt"==this.$type;n&&this.initialValue&&(this.result=this.initialValue),this.hide=function(){o.hide(!n||this.result)},this.abort=function(){o.cancel()},this.keypress=function(e){var t=n&&this.required&&!de.isDefined(this.result);e.keyCode!==i.KEY_CODE.ENTER||t||o.hide(this.result)}}}function o(u,s,p,h,l,c,f,m,g,a,t,d,b){return{hasBackdrop:!0,isolateScope:!0,onCompiling:function(e){e.defaultTheme=t.defaultTheme(),function(t){var e;t.targetEvent&&t.targetEvent.target&&(e=de.element(t.targetEvent.target));var n=e&&e.controller("mdTheme");if(t.hasTheme=!!n,!t.hasTheme)return;t.themeWatch=n.$shouldWatch;var o=t.theme||n.$mdTheme;o&&(t.scope.theme=o);var i=n.registerChanges(function(e){t.scope.theme=e,t.themeWatch||i()})}(e)},onShow:function(e,t,n,o){de.element(c[0].body).addClass("md-dialog-is-showing");var i=t.find("md-dialog");if(i.hasClass("ng-cloak")){g.warn("$mdDialog: using `<md-dialog ng-cloak>` will affect the dialog opening animations.",t[0])}return function(e){function t(e,t){var n=de.element(e||{});if(n&&n.length){var o=de.isFunction(n[0].getBoundingClientRect);return de.extend(t||{},{element:o?n:se,bounds:o?n[0].getBoundingClientRect():de.extend({},{top:0,left:0,height:0,width:0},n[0]),focus:de.bind(n,n.focus)})}}function n(e,t){return de.isString(e)&&(e=c[0].querySelector(e)),de.element(e||t)}e.origin=de.extend({element:null,bounds:null,focus:de.noop},e.origin||{}),e.parent=n(e.parent,m),e.closeTo=t(n(e.closeTo)),e.openFrom=t(n(e.openFrom)),e.targetEvent&&(e.origin=t(e.targetEvent.target,e.origin),e.originInteraction=b.getLastInteractionType())}(n),function(e,t){var n="alert"===t.$type?"alertdialog":"dialog",o=e.find("md-dialog-content"),i=e.attr("id"),r="dialogContent_"+(i||p.nextUid());e.attr({role:n,tabIndex:"-1"}),0===o.length&&(o=e,i&&(r=i)),o.attr("id",r),e.attr("aria-describedby",r),t.ariaLabel?s.expect(e,"aria-label",t.ariaLabel):s.expectAsync(e,"aria-label",function(){if(t.title)return t.title;var e=o.text().split(/\s+/);return 3<e.length&&(e=e.slice(0,3).concat("...")),e.join(" ")}),($=document.createElement("div")).classList.add("md-dialog-focus-trap"),$.tabIndex=0,y=$.cloneNode(!1);var a=function(){e.focus()};$.addEventListener("focus",a),y.addEventListener("focus",a),e[0].parentNode.insertBefore($,e[0]),e.after(y)}(i,n),r=e,a=t,d=n,d.disableParentScroll&&(d.restoreScroll=p.disableScrollAround(a,d.parent)),d.hasBackdrop&&(d.backdrop=p.createBackdrop(r,"md-dialog-backdrop md-opaque"),l.enter(d.backdrop,d.parent)),d.hideBackdrop=function(e){d.backdrop&&(e?d.backdrop.remove():l.leave(d.backdrop)),d.disableParentScroll&&(d.restoreScroll&&d.restoreScroll(),delete d.restoreScroll),d.hideBackdrop=null},function(e,t){var n=de.element(f),o=p.debounce(function(){v(e,t)},60),i=[],r=function(){var e="alert"==t.$type?u.hide:u.cancel;p.nextTick(e,!0)};if(t.escapeToClose){var a=t.parent,d=function(e){e.keyCode===h.KEY_CODE.ESCAPE&&(e.stopPropagation(),e.preventDefault(),r())};e.on("keydown",d),a.on("keydown",d),i.push(function(){e.off("keydown",d),a.off("keydown",d)})}if(n.on("resize",o),i.push(function(){n.off("resize",o)}),t.clickOutsideToClose){var s,l=e,c=function(e){s=e.target},m=function(e){s===l[0]&&e.target===l[0]&&(e.stopPropagation(),e.preventDefault(),r())};l.on("mousedown",c),l.on("mouseup",m),i.push(function(){l.off("mousedown",c),l.off("mouseup",m)})}t.deactivateListeners=function(){i.forEach(function(e){e()}),t.deactivateListeners=null}}(t,n),function(e,t){t.parent.append(e),t.reverseContainerStretch=v(e,t);var n=e.find("md-dialog"),o=p.dom.animator,i=o.calculateZoomToOrigin,r={transitionInClass:"md-transition-in",transitionOutClass:"md-transition-out"},a=o.toTransformCss(i(n,t.openFrom||t.origin)),d=o.toTransformCss("");return n.toggleClass("md-dialog-fullscreen",!!t.fullscreen),o.translate3d(n,a,d,r).then(function(e){return t.reverseAnimate=function(){return delete t.reverseAnimate,t.closeTo?(r={transitionInClass:"md-transition-out",transitionOutClass:"md-transition-in"},a=d,d=o.toTransformCss(i(n,t.closeTo)),o.translate3d(n,a,d,r)):e(d=o.toTransformCss(i(n,t.origin)))},t.clearAnimate=function(){return delete t.clearAnimate,n.removeClass([r.transitionOutClass,r.transitionInClass].join(" ")),o.translate3d(n,d,o.toTransformCss(""),{})},!0})}(t,n).then(function(){!function(e,t){var o=!0;function n(e){for(var t=function(e){for(var t=[];e.parentNode;){if(e===document.body)return t;for(var n=e.parentNode.children,o=0;o<n.length;
10510o++)e===n[o]||E(n[o],["SCRIPT","STYLE"])||n[o].hasAttribute("aria-live")||t.push(n[o]);e=e.parentNode}return t}(e),n=0;n<t.length;n++)t[n].setAttribute("aria-hidden",o)}n(e[0]),t.unlockScreenReader=function(){o=!1,n(e[0]),t.unlockScreenReader=null}}(t,n),t[0].querySelector(".md-actions")&&g.warn("Using a class of md-actions is deprecated, please use <md-dialog-actions>."),function(){if(n.focusOnOpen){var e=p.findFocusTarget(t)||t[0].querySelector(".dialog-close, md-dialog-actions button:last-child")||i;e.focus()}}()});var r,a,d},onShowing:function(e,t,n,o){if(o){var i=o.htmlContent||n.htmlContent||"",r=o.textContent||n.textContent||o.content||n.content||"";if(i&&!a.has("$sanitize"))throw Error("The ngSanitize module must be loaded in order to use htmlContent.");if(i&&r)throw Error("md-dialog cannot have both `htmlContent` and `textContent`");o.mdHtmlContent=i,o.mdTextContent=r}},onRemove:function(e,t,n){n.deactivateListeners(),n.unlockScreenReader(),n.hideBackdrop(n.$destroy),$&&$.parentNode&&$.parentNode.removeChild($);y&&y.parentNode&&y.parentNode.removeChild(y);return n.$destroy?i():(o=n,o.reverseAnimate().then(function(){o.contentElement&&o.clearAnimate()})).then(i);var o;function i(){de.element(c[0].body).removeClass("md-dialog-is-showing"),n.contentElement&&n.reverseContainerStretch(),n.cleanupElement(),n.$destroy||"keyboard"!==n.originInteraction||n.origin.focus()}},clickOutsideToClose:!1,escapeToClose:!0,targetEvent:null,closeTo:null,openFrom:null,focusOnOpen:!0,disableParentScroll:!0,autoWrap:!0,fullscreen:!1,transformTemplate:function(e,t){var n,o=d.startSymbol(),i=d.endSymbol(),r=o+(t.themeWatch?"":"::")+"theme"+i;return'<div class="md-dialog-container" tabindex="-1" '+(t.hasTheme?'md-theme="'+r+'"':"")+">"+(n=e,t.autoWrap&&!/<\/md-dialog>/g.test(n)?"<md-dialog>"+(n||"")+"</md-dialog>":n||"")+"</div>"}};function v(e,t){var n="fixed"==f.getComputedStyle(c[0].body).position,o=t.backdrop?f.getComputedStyle(t.backdrop[0]):null,i=o?Math.min(c[0].body.clientHeight,Math.ceil(Math.abs(parseInt(o.height,10)))):0,r={top:e.css("top"),height:e.css("height")},a=Math.abs(t.parent[0].getBoundingClientRect().top);return e.css({top:(n?a:0)+"px",height:i?i+"px":"100%"}),function(){e.css(r)}}function E(e,t){if(-1!==t.indexOf(e.nodeName))return!0}}}e.$inject=["$$rAF","$mdTheming","$mdDialog"],t.$inject=["$$interimElementProvider"],de.module("material.components.dialog",["material.core","material.components.backdrop"]).directive("mdDialog",e).provider("$mdDialog",t)}(),function(){function e(e){return{restrict:"E",link:e}}e.$inject=["$mdTheming"],de.module("material.components.divider",["material.core"]).directive("mdDivider",e)}(),function(){function e(o){return{restrict:"E",require:["^?mdFabSpeedDial","^?mdFabToolbar"],compile:function(e,t){var n=e.children();o.prefixer().hasAttribute(n,"ng-repeat")?n.addClass("md-fab-action-item"):n.wrap('<div class="md-fab-action-item">')}}}e.$inject=["$mdUtil"],de.module("material.components.fabActions",["material.core"]).directive("mdFabActions",e)}(),function(){function e(t,r,a,d,s,i){var l,c=this,e=0;function n(e){var t,n,o;"click"==e.type&&(n=(t=e).target,d.getClosest(n,"md-fab-trigger")&&c.toggle(),o=t.target,d.getClosest(o,"md-fab-actions")&&c.close()),"focusout"!=e.type||l||(l=i(function(){c.close()},100,!1)),"focusin"==e.type&&l&&(i.cancel(l),l=null)}function m(){c.currentActionIndex=-1}function u(){0<r[0].scrollHeight?a.addClass(r,"_md-animations-ready").then(function(){r.removeClass("md-animations-waiting")}):e<10&&(i(u,100),e+=1)}function p(){r.off("keydown",f),de.element(document).off("click touchend",h)}function h(e){if(e.target){var t=d.getClosest(e.target,"md-fab-trigger"),n=d.getClosest(e.target,"md-fab-actions");t||n||c.close()}}function f(e){switch(e.which){case s.KEY_CODE.ESCAPE:return c.close(),e.preventDefault(),!1;case s.KEY_CODE.LEFT_ARROW:return i=e,"left"===c.direction?b(i):g(i),!1;case s.KEY_CODE.UP_ARROW:return o=e,"down"===c.direction?g(o):b(o),!1;case s.KEY_CODE.RIGHT_ARROW:return n=e,"left"===c.direction?g(n):b(n),!1;case s.KEY_CODE.DOWN_ARROW:return t=e,"up"===c.direction?g(t):b(t),!1}var t,n,o,i}function g(e){o(e,-1)}function b(e){o(e,1)}function o(e,t){var n,o=(n=v()[0].querySelectorAll(".md-fab-action-item"),de.forEach(n,function(e){de.element(de.element(e).children()[0]).attr("tabindex",-1)}),n);c.currentActionIndex=c.currentActionIndex+t,c.currentActionIndex=Math.min(o.length-1,c.currentActionIndex),c.currentActionIndex=Math.max(0,c.currentActionIndex);var i=de.element(o[c.currentActionIndex]).children()[0];de.element(i).attr("tabindex",0),i.focus(),e.preventDefault(),e.stopImmediatePropagation()}function v(){return r.find("md-fab-actions")}c.open=function(){t.$evalAsync("vm.isOpen = true")},c.close=function(){t.$evalAsync("vm.isOpen = false"),r.find("md-fab-trigger")[0].focus()},c.toggle=function(){t.$evalAsync("vm.isOpen = !vm.isOpen")},c.$onInit=function(){var e,o,i;c.direction=c.direction||"down",c.isOpen=c.isOpen||!1,m(),r.addClass("md-animations-waiting"),e=["click","focusin","focusout"],de.forEach(e,function(e){r.on(e,n)}),t.$on("$destroy",function(){de.forEach(e,function(e){r.off(e,n)}),p()}),t.$watch("vm.direction",function(e,t){a.removeClass(r,"md-"+t),a.addClass(r,"md-"+e),m()}),t.$watch("vm.isOpen",function(e){m(),o&&i||(o=r.find("md-fab-trigger"),i=v()),e?(r.on("key
10510down",f),d.nextTick(function(){de.element(document).on("click touchend",h)})):p();var t=e?"md-is-open":"",n=e?"":"md-is-open";o.attr("aria-haspopup",!0),o.attr("aria-expanded",e),i.attr("aria-hidden",!e),a.setClass(r,t,n)}),u()},1===de.version.major&&de.version.minor<=4&&this.$onInit()}e.$inject=["$scope","$element","$animate","$mdUtil","$mdConstant","$timeout"],de.module("material.components.fabShared",["material.core"]).controller("MdFabController",e)}(),function(){e.$inject=["$timeout"],t.$inject=["$timeout"];var n=300;function e(t){function o(e){t(e,n,!1)}function i(e){if(!e.hasClass("md-animations-waiting")||e.hasClass("_md-animations-ready")){var t=e[0],s=e.controller("mdFabSpeedDial"),o=t.querySelectorAll(".md-fab-action-item"),l=t.querySelector("md-fab-trigger"),n=t.querySelector("._md-css-variables"),i=parseInt(B.getComputedStyle(n).zIndex);de.forEach(o,function(e,t){var n=e.style;n.transform=n.webkitTransform="",n.transitionDelay="",n.opacity=1,n.zIndex=o.length-t+i}),l.style.zIndex=i+o.length+1,s.isOpen||de.forEach(o,function(e,t){var n,o,i=e.style,r=(l.clientHeight-e.clientHeight)/2,a=(l.clientWidth-e.clientWidth)/2;switch(s.direction){case"up":n=e.scrollHeight*(t+1)+r,o="Y";break;case"down":n=-(e.scrollHeight*(t+1)+r),o="Y";break;case"left":n=e.scrollWidth*(t+1)+a,o="X";break;case"right":n=-(e.scrollWidth*(t+1)+a),o="X"}var d="translate"+o+"("+n+"px)";i.transform=i.webkitTransform=d})}}return{addClass:function(e,t,n){e.hasClass("md-fling")?(i(e),o(n)):n()},removeClass:function(e,t,n){i(e),o(n)}}}function t(t){function o(e){t(e,n,!1)}function i(e){var t=e[0],i=e.controller("mdFabSpeedDial"),r=t.querySelectorAll(".md-fab-action-item"),n=t.querySelector("._md-css-variables"),a=parseInt(B.getComputedStyle(n).zIndex);de.forEach(r,function(e,t){var n=e.style,o=65*t;n.opacity=i.isOpen?1:0,n.transform=n.webkitTransform=i.isOpen?"scale(1)":"scale(0)",n.transitionDelay=(i.isOpen?o:r.length-o)+"ms",n.zIndex=r.length-t+a})}return{addClass:function(e,t,n){i(e),o(n)},removeClass:function(e,t,n){i(e),o(n)}}}de.module("material.components.fabSpeedDial",["material.core","material.components.fabShared","material.components.fabActions"]).directive("mdFabSpeedDial",function(){return{restrict:"E",scope:{direction:"@?mdDirection",isOpen:"=?mdOpen"},bindToController:!0,controller:"MdFabController",controllerAs:"vm",link:function(e,t){t.prepend('<div class="_md-css-variables"></div>')}}}).animation(".md-fling",e).animation(".md-scale",t).service("mdFabSpeedDialFlingAnimation",e).service("mdFabSpeedDialScaleAnimation",t)}(),function(){function e(){function o(e,t,n){if(t){var o=e[0],i=e.controller("mdFabToolbar"),r=o.querySelector(".md-fab-toolbar-background"),a=o.querySelector("md-fab-trigger button"),d=o.querySelector("md-toolbar"),s=o.querySelector("md-fab-trigger button md-icon"),l=e.find("md-fab-actions").children();if(a&&r){var c=B.getComputedStyle(a).getPropertyValue("background-color"),m=o.offsetWidth,u=(o.offsetHeight,m/a.offsetWidth*2);r.style.backgroundColor=c,r.style.borderRadius=m+"px",i.isOpen?(d.style.pointerEvents="inherit",r.style.width=a.offsetWidth+"px",r.style.height=a.offsetHeight+"px",r.style.transform="scale("+u+")",r.style.transitionDelay="0ms",s&&(s.style.transitionDelay=".3s"),de.forEach(l,function(e,t){e.style.transitionDelay=25*(l.length-t)+"ms"})):(d.style.pointerEvents="none",r.style.transform="scale(1)",r.style.top="0",e.hasClass("md-right")&&(r.style.left="0",r.style.right=null),e.hasClass("md-left")&&(r.style.right="0",r.style.left=null),r.style.transitionDelay="200ms",s&&(s.style.transitionDelay="0ms"),de.forEach(l,function(e,t){e.style.transitionDelay=200+25*t+"ms"}))}}}return{addClass:function(e,t,n){o(e,t),n()},removeClass:function(e,t,n){o(e,t),n()}}}de.module("material.components.fabToolbar",["material.core","material.components.fabShared","material.components.fabActions"]).directive("mdFabToolbar",function(){return{restrict:"E",transclude:!0,template:'<div class="md-fab-toolbar-wrapper"> <div class="md-fab-toolbar-content" ng-transclude></div></div>',scope:{direction:"@?mdDirection",isOpen:"=?mdOpen"},bindToController:!0,controller:"MdFabController",controllerAs:"vm",link:function(e,t,n){t.addClass("md-fab-toolbar"),t.find("md-fab-trigger").find("button").prepend('<div class="md-fab-toolbar-background"></div>')}}}).animation(".md-fab-toolbar",e).service("mdFabToolbarAnimation",e)}(),function(){function e(p,b,v,E){return{restrict:"E",controller:t,scope:{mdOnLayout:"&"},link:function(r,a,d,t){a.addClass("_md"),a.attr("role","list"),t.layoutDelegate=function(e){var o=[].filter.call(a.children(),function(e){return"MD-GRID-TILE"==e.tagName&&!e.$$mdDestroyed}),i={tileSpans:(t=o,[].map.call(t,function(e){var t=de.element(e).controller("mdGridTile");return{row:parseInt(E.getResponsiveAttribute(t.$attrs,"md-rowspan"),10)||1,col:parseInt(E.getResponsiveAttribute(t.$attrs,"md-colspan"),10)||1}})),colCount:function(){var e=parseInt(E.getResponsiveAttribute(d,"md-cols"),10);if(isNaN(e))throw"md-grid-list: md-cols attribute was not found, or contained a non-numeric value";return e}(),rowMode:m(),rowHeight:function(){var e=E.getResponsiveAttribute(d,"md-row-height");if(!e)throw"md-grid-list: md-row-height attribute was not found";switch(m()){case"fixed":return u(e);case"ratio":var t=e.split(":");return parseFloat(t[0])/parseFloat(t[1]);case"fit":return 0}}(),gutter:u(E.getResponsiveAttribute(d,"md-gutter")||1)};var t;if(!e&&de.equals(i,s))return;var n=v(i.colCount,i.tileSpans,o).map(function(e,n){return{grid:{element:a,style:function(e,t,n,o,i){var r={};switch(o){case"fixed":r.height=g({unit:i,span:t,gutter:n}),r.paddingBottom="";break;case"ratio":var a=1===e?0:(e-1)/e,d=1/e*100,s=d*(1/i),l=h({share:s,gutterShare:a,gutter:n});r.height="",r.paddingBottom=g({unit:l,span:t,gutter:n})}return r}(i.colCount,n,i.gutter,i.rowMode,i.rowHeight)},tiles:e.map(function(e,t){return{element:de.element(o[t]),style:function(e,t,n,o,i,r,a){var d=1/n*100,s=(n-1)/n,l=h({share:d,gutterShare:s,gutter:i}),c="rtl"!=document.dir&&"rtl"!=document.body.dir?{left:f({unit:l,offset:e.col,gutter:i}),width:g({unit:l,span:t.col,gutter:i}),paddingTop:"",marginTop:"",top:"",height:""}:{right:f({unit:l,offset:e.col,gutter:i}),width:g({unit:l,span:t.col,gutter:i}),paddingTop:"",marginTop:"",top:"",height:""};switch(r){case"fixed":c.top=f({unit:a,offset:e.row,gutter:i}),c.height=g({unit:a,span:t.row,gutter:i});break;case"ratio":var m=d/a,u=h({share:m,gutterShare:s,gutter:i});c.paddingTop=g({unit:u,span:t.row,gutter:i}),c.marginTop=f({unit:u,offset:e.row,gutter:i});break;case"fit":var p=(o-1)/o;u=h({share:m=1/o*100,gutterShare:p,gutter:i}),c.top=f({unit:u,offset:e.row,gutter:i}),c.height=g({unit:u,span:t.row,gutter:i})}return c}(e.position,e.spans,i.colCount,n,i.gutter,i.rowMode,i.rowHeight)}})}}).reflow().performance();r.mdOnLayout({$event:{performance:n}}),s=i};var s,n=de.bind(t,t.invalidateLayout),o=function(){for(var e in b.MEDIA)E(e),E.getQuery(b.MEDIA[e]).addListener(n);return E.watchResponsiveAttributes(["md-cols","md-row-height","md-gutter"],d,i)}();function i(e){null==e?t.invalidateLayout():E(e)&&t.invalidateLayout()}r.$on("$destroy",function(){for(var e in t.layoutDelegate=de.noop,o(),b.MEDIA)E.getQuery(b.MEDIA[e]).removeListener(n)});var l=p.startSymbol(),c=p.endSymbol();function e(e){return l+e+c}var h=p(e("share")+"% - ("+e("gutter")+" * "+e("gutterShare")+")"),f=p("calc(("+e("unit")+" + "+e("gutter")+") * "+e("offset")+")"),g=p("calc(("+e("unit")+") * "+e("span")+" + ("+e("span")+" - 1) * "+e("gutter")+")");function m(){var e=E.getResponsiveAttribute(d,"md-row-height");if(!e)throw"md-grid-list: md-row-height attribute was not found";return"fit"==e?"fit":-1!==e.indexOf(":")?"ratio":"fixed"}function u(e){return/\D$/.test(e)?e:e+"px"}}}}
vendor: 11,058 bytes, line 10510
10510function t(e){this.layoutInvalidated=!1,this.tilesInvalidated=!1,this.$timeout_=e.nextTick,this.layoutDelegate=de.noop}function n(s){var l=t;return e.animateWith=function(e){l=de.isFunction(e)?e:t},e;function e(e,t){var n,o,i,r,a,d;return r=s.time(function(){o=function(i,e){var r=0,a=0,d=function(){for(var e=[],t=0;t<i;t++)e.push(0);return e}();return{positioning:e.map(function(e,t){return{spans:e,position:function(e,t){if(e.col>i)throw"md-grid-list: Tile at position "+t+" has a colspan ("+e.col+") that exceeds the column count ("+i+")";var n=0,o=0;for(;o-n<e.col;)i<=r?s():-1!==(n=d.indexOf(0,r))&&-1!==(o=c(n+1))?r=o+1:(n=o=0,s());return l(n,e.col,e.row),r=n+e.col,{col:n,row:a}}(e,t)}}),rowCount:a+Math.max.apply(Math,d)};function s(){a++,l(r=0,i,-1)}function l(e,t,n){for(var o=e;o<e+t;o++)d[o]=Math.max(d[o]+n,0)}function c(e){var t;for(t=e;t<d.length;t++)if(0!==d[t])return t;if(t===d.length)return t}}(e,t)}),n={layoutInfo:function(){return o},map:function(t){return a=s.time(function(){var e=n.layoutInfo();i=t(e.positioning,e.rowCount)}),n},reflow:function(e){return d=s.time(function(){(e||l)(i.grid,i.tiles)}),n},performance:function(){return{tileCount:t.length,layoutTime:r,mapTime:a,reflowTime:d,totalTime:r+a+d}}}}function t(e,t){e.element.css(e.style),t.forEach(function(e){e.element.css(e.style)})}}function o(r){return{restrict:"E",require:"^mdGridList",template:"<figure ng-transclude></figure>",transclude:!0,scope:{},controller:["$attrs",function(e){this.$attrs=e}],link:function(e,t,n,o){t.attr("role","listitem");var i=r.watchResponsiveAttributes(["md-colspan","md-rowspan"],n,de.bind(o,o.invalidateLayout));o.invalidateTiles(),e.$on("$destroy",function(){t[0].$$mdDestroyed=!0,i(),o.invalidateLayout()}),de.isDefined(e.$parent.$index)&&e.$watch(function(){return e.$parent.$index},function(e,t){e!==t&&o.invalidateTiles()})}}}function i(){return{template:"<figcaption ng-transclude></figcaption>",transclude:!0}}t.$inject=["$mdUtil"],n.$inject=["$mdUtil"],e.$inject=["$interpolate","$mdConstant","$mdGridLayout","$mdMedia"],o.$inject=["$mdMedia"],de.module("material.components.gridList",["material.core"]).directive("mdGridList",e).directive("mdGridTile",o).directive("mdGridTileFooter",i).directive("mdGridTileHeader",i).factory("$mdGridLayout",n),t.prototype={invalidateTiles:function(){this.tilesInvalidated=!0,this.invalidateLayout()},invalidateLayout:function(){this.layoutInvalidated||(this.layoutInvalidated=!0,this.$timeout_(de.bind(this,this.layout)))},layout:function(){try{this.layoutDelegate(this.tilesInvalidated)}finally{this.layoutInvalidated=!1,this.tilesInvalidated=!1}}}}(),de.module("material.components.icon",["material.core"]),function(){t.$inject=["$mdTheming","$parse","$$rAF"],n.$inject=["$mdUtil","$window","$mdAria","$timeout","$mdGesture"],o.$inject=["$animate","$mdUtil"],i.$inject=["$compile"],c.$inject=["$mdUtil"],r.$inject=["$document","$timeout"],m.$inject=["$$AnimateRunner","$animateCss","$mdUtil"],u.$inject=["$$AnimateRunner","$animateCss","$mdUtil"],p.$inject=["$$AnimateRunner","$animateCss","$mdUtil","$log"];var e=de.module("material.components.input",["material.core"]).directive("mdInputContainer",t).directive("label",function(){return{restrict:"E",require:"^?mdInputContainer",link:function(e,t,n,o){!o||n.mdNoFloat||t.hasClass("md-container-ignore")||(o.label=t,e.$on("$destroy",function(){o.label=null}))}}}).directive("input",n).directive("textarea",n).directive("mdMaxlength",o).directive("placeholder",i).directive("ngMessages",function(){return{restrict:"EA",link:function(e,t,n,o){if(!o)return;t.toggleClass("md-input-messages-animation",!0),t.toggleClass("md-auto-hide",!0),("false"==n.mdAutoHide||(i=n,l.some(function(e){return i[e]})))&&t.toggleClass("md-auto-hide",!1);var i},require:"^^?mdInputContainer"}}).directive("ngMessage",c).directive("ngMessageExp",c).directive("mdSelectOnFocus",r).animation(".md-input-invalid",m).animation(".md-input-messages-animation",u).animation(".md-input-message-animation",p);function t(i,r,a){n.$inject=["$scope","$element","$attrs","$animate"];var e=["INPUT","TEXTAREA","SELECT","MD-SELECT"],t=e.reduce(function(e,t){return e.concat(["md-icon ~ "+t,".md-icon ~ "+t])},[]).join(","),d=e.reduce(function(e,t){return e.concat([t+" ~ md-icon",t+" ~ .md-icon"])},[]).join(",");return{restrict:"E",compile:function(e){var n=e[0].querySelector(t),o=e[0].querySelector(d);return function(e,t){i(t),(n||o)&&a(function(){var e=t[0].querySelector("md-icon")||t[0].querySelector(".md-icon");n&&e&&t.addClass("md-icon-left"),o&&e&&t.addClass("md-icon-right")})}},controller:n};function n(e,t,n,o){var i=this;i.isErrorGetter=n.mdIsError&&r(n.mdIsError),i.delegateClick=function(){i.input.focus()},i.element=t,i.setFocused=function(e){t.toggleClass("md-input-focused",!!e)},i.setHasValue=function(e){t.toggleClass("md-input-has-value",!!e)},i.setHasPlaceholder=function(e){t.toggleClass("md-input-has-placeholder",!!e)},i.setInvalid=function(e){e?o.addClass(t,"md-input-invalid"):o.removeClass(t,"md-input-invalid")},e.$watch(function(){return i.label&&i.input},function(e){e&&!i.label.attr("for")&&i.label.attr("for",i.input.attr("id"))})}}function n(b,v,c,E,$){return{restrict:"E",require:["^?mdInputContainer","?ngModel","?^form"],link:function(m,u,p,e){var h=e[0],f=!!e[1],g=e[1]||b.fakeNgModel(),t=e[2],n=de.isDefined(p.readonly),o=b.parseAttributeBoolean(p.mdNoAsterisk),i=u[0].tagName.toLowerCase();if(!h)return;{if("hidden"===p.type)return void u.attr("aria-hidden","true");if(h.input){if(h.input[0].contains(u[0]))return;throw new Error("<md-input-container> can only have *one* <input>, <textarea> or <md-select> child element!")}}h.input=u,h.label&&p.$observe("required",function(e){h.label.toggleClass("md-required",e&&!o)});var r=de.element('<div class="md-errors-spacer">');u.after(r);var a=de.isString(p.placeholder)?p.placeholder.trim():"";h.label||a.length||c.expect(u,"aria-label");u.addClass("md-input"),u.attr("id")||u.attr("id","input_"+b.nextUid());"input"===i&&"number"===p.type&&p.min&&p.max&&!p.step?u.attr("step","any"):"textarea"===i&&function(){var t=!p.hasOwnProperty("mdNoAutogrow");if(function(){if(!p.hasOwnProperty("mdNoResize")){var e=de.element('<div class="md-resize-handle"></div>'),t=!1,n=0,o=h.element,i=$.register(e,"drag",{horizontal:!1});u.wrap('<div class="md-resize-wrapper">').after(e),e.on("mousedown",r),o.on("$md.dragstart",a).on("$md.drag",d).on("$md.dragend",s),m.$on("$destroy",function(){e.off("mousedown",r).remove(),o.off("$md.dragstart",a).off("$md.drag",d).off("$md.dragend",s),i(),i=o=e=null})}function r(e){e.preventDefault(),t=!0,e.clientY,n=parseFloat(u.css("height"))||u.prop("offsetHeight")}function a(e){t&&(e.preventDefault(),l(),o.addClass("md-input-resized"))}function d(e){t&&u.css("height",n+e.pointer.distanceY+"px")}function s(e){t&&(t=!1,o.removeClass("md-input-resized"))}}(),!t)return;var r=p.hasOwnProperty("rows")?parseInt(p.rows):NaN,a=p.hasOwnProperty("maxRows")?parseInt(p.maxRows):NaN,n=m.$on("md-resize-textarea",o),d=null,s=u[0];E(function(){b.nextTick(o)},10,!1),u.on("input",o),f&&g.$formatters.push(i);r||u.attr("rows",1);function o(){u.attr("rows",1).css("height","auto").addClass("md-no-flex");var e,t,n=(e=s.offsetHeight,t=s.scrollHeight-e,e+Math.max(t,0));if(!d){var o=u[0].style.padding||"";d=u.css("padding",0).prop("offsetHeight"),u[0].style.padding=o}if(r&&d&&(n=Math.max(n,d*r)),a&&d){var i=d*a;i<n?(u.attr("md-no-autogrow",""),n=i):u.removeAttr("md-no-autogrow")}d&&u.attr("rows",Math.round(n/d)),u.css("height",n+"px").removeClass("md-no-flex")}function i(e){return b.nextTick(o),e}function l(){if(t&&(t=!1,de.element(v).off("resize",o),n&&n(),u.attr("md-no-autogrow","").off("input",o),f)){var e=g.$formatters.indexOf(i);-1<e&&g.$formatters.splice(e,1)}}if(de.element(v).on("resize",o),m.$on("$destroy",l),p.hasOwnProperty("mdDetectHidden")){var e=(c=!1,function(){var e=0===s.offsetHeight;!1===e&&!0===c&&o(),c=e});m.$watch(function(){return b.nextTick(e,!1),!0})}var c}();f||l();var d=h.isErrorGetter||function(){return g.$invalid&&(g.$touched||t&&t.$submitted)};m.$watch(d,h.setInvalid),p.ngValue&&p.$observe("value",l);g.$parsers.push(s),g.$formatters.push(s),u.on("input",l),n||u.on("focus",function(e){b.nextTick(function(){h.setFocused(!0)})}).on("blur",function(e){b.nextTick(function(){h.setFocused(!1),l()})});function s(e){return h.setHasValue(!g.$isEmpty(e)),e}function l(){h.setHasValue(0<u.val().length||(u[0].validity||{}).badInput)}m.$on("$destroy",function(){h.setFocused(!1),h.setHasValue(!1),h.input=null})}}}function o(p,h){return{restrict:"A",require:["ngModel","^mdInputContainer"],link:function(e,o,t,n){var i=parseInt(t.mdMaxlength);isNaN(i)&&(i=-1);var r,a,d=n[0],s=n[1],l=!de.isDefined(t.ngTrim)||h.parseAttributeBoolean(t.ngTrim),c="password"===t.type;function m(e){return(e=l&&!c&&de.isString(e)?e.trim():e)!==se&&null!==e||(e=""),String(e).length}function u(){r&&r.parent()&&r.text(m(o.val())+" / "+i)}e.$watch(t.mdMaxlength,function(e){i=e}),d.$validators["md-maxlength"]=function(e,t){if(!de.isNumber(i)||i<0)return!0;u();var n=o.val()||t;return n!==se&&null!==n||(n=""),n=l&&!c&&de.isString(n)?n.trim():n,String(n).length<=i},d.$isEmpty=function(e){return 0===m(e)},h.nextTick(function(){a=de.element(s.element[0].querySelector(".md-errors-spacer")),r=de.element('<div class="md-char-counter">'),a.append(r),t.$observe("ngTrim",function(e){l=!de.isDefined(e)||h.parseAttributeBoolean(e)}),e.$watch(t.mdMaxlength,function(e){de.isNumber(e)&&0<e?(r.parent().length||p.enter(r,a),u()):p.leave(r)})})}}}function i(d){return{restrict:"A",require:"^^?mdInputContainer",priority:200,link:{pre:function(e,t,n,o){if(!o)return;var i=o.element.find("label"),r=o.element.attr("md-no-float");if(i&&i.length||""===r||e.$eval(r))return void o.setHasPlaceholder(!0);if("MD-SELECT"!==t[0].nodeName){var a=de.element('<label ng-click="delegateClick()" tabindex="-1" aria-hidden="true">'+n.placeholder+"</label>");n.$set("placeholder",null),o.element.addClass("md-icon-float").prepend(a),d(a)(e)}}}}}function r(a,d){return{restrict:"A",link:function(e,t,n){if("INPUT"!==t[0].nodeName&&"TEXTAREA"!==t[0].nodeName)return;var o=!1;function i(){d(function(){a[0].activeElement===t[0]&&t[0].select(),o=!1},1,!(o=!0))}function r(e){o&&e.preventDefault()}t.on("focus",i).on("mouseup",r),e.$on("$destroy",function(){t.off("focus",i).off("mouseup",r)})}}}B._mdMocksIncluded&&e.service("$$mdInput",function(){return{messages:{getElement:v}}}).service("mdInputInvalidAnimation",m).service("mdInputMessagesAnimation",u).service("mdInputMessageAnimation",p);var a,d,s,l=["ngIf","ngShow","ngHide","ngSwitchWhen","ngSwitchDefault"];function c(t){return{restrict:"EA",compile:function(n){if(o(n))i(n);else if(function(){var e=n[0];for(;e=e.parentNode;)if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!0;return!1}())return function(e,t){o(t)&&i(n)};function o(e){return!!t.getClosest(e,"md-input-container")}function i(e){e.toggleClass("md-input-message-animation",!0)}},priority:100}}function m(e,t,n){return E(e,t,n),{addClass:function(e,t,n){h(e,n)}}}
10510function u(e,t,n){return E(e,t,n),{enter:function(e,t){h(e,t)},leave:function(e,t){f(e,t)},addClass:function(e,t,n){"ng-hide"==t?f(e,n):n()},removeClass:function(e,t,n){"ng-hide"==t?h(e,n):n()}}}function p(e,t,n,o){return E(e,t,n),{enter:function(e,t){g(e).start().done(t)},leave:function(e,t){b(e).start().done(t)}}}function h(e,t){var n,o=[],i=v(e),r=i.children();0!=i.length&&0!=r.length?(de.forEach(r,function(e){n=g(de.element(e)),o.push(n.start())}),a.all(o,t)):t()}function f(e,t){var n,o=[],i=v(e),r=i.children();0!=i.length&&0!=r.length?(de.forEach(r,function(e){n=b(de.element(e)),o.push(n.start())}),a.all(o,t)):t()}function g(e){var t=parseInt(B.getComputedStyle(e[0]).height),n=parseInt(B.getComputedStyle(e[0]).marginTop),o=v(e),i=e.controller("mdInputContainer").element;return-t<n||o.hasClass("md-auto-hide")&&!i.hasClass("md-input-invalid")?d(e,{}):d(e,{event:"enter",structural:!0,from:{opacity:0,"margin-top":-t+"px"},to:{opacity:1,"margin-top":"0"},duration:.3})}function b(e){var t=e[0].offsetHeight,n=B.getComputedStyle(e[0]);return 0===parseInt(n.opacity)?d(e,{}):d(e,{event:"leave",structural:!0,from:{opacity:1,"margin-top":0},to:{opacity:0,"margin-top":-t+"px"},duration:.3})}function v(e){return e.hasClass("md-input-messages-animation")?e:e.hasClass("md-input-message-animation")?de.element(s.getClosest(e,function(e){return e.classList.contains("md-input-messages-animation")})):de.element(e[0].querySelector(".md-input-messages-animation"))}function E(e,t,n){a=e,d=t,s=n}}(),function(){function e(t){return{restrict:"E",compile:function(e){return e[0].setAttribute("role","list"),t}}}function t(u,p,h,f){var g=["md-checkbox","md-switch","md-menu"];return{restrict:"E",controller:"MdListController",compile:function(r,a){var e,i,t,n=r[0].querySelectorAll(".md-secondary"),o=r;if(r[0].setAttribute("role","listitem"),a.ngClick||a.ngDblclick||a.ngHref||a.href||a.uiSref||a.ngAttrUiSref)l("button");else if(!r.hasClass("md-no-proxy")){for(var d,s=0;d=g[s];++s)if(i=r[0].querySelector(d)){e=!0;break}e?l("div"):r.addClass("md-no-proxy")}function l(e){if("div"==e)(o=de.element('<div class="md-no-style md-list-item-inner">')).append(r.contents()),r.addClass("md-proxy-focus");else{o=de.element('<div class="md-button md-no-style"> <div class="md-list-item-inner"></div></div>');var t=de.element('<md-button class="md-no-style"></md-button>');c(r[0],t[0]),t.attr("aria-label")||t.attr("aria-label",u.getText(r)),r.hasClass("md-no-focus")&&t.addClass("md-no-focus"),o.prepend(t),o.children().eq(1).append(r.contents()),r.addClass("_md-button-wrap")}r[0].setAttribute("tabindex","-1"),r.append(o)}function c(t,n,e){var o=h.prefixer(["ng-if","ng-click","ng-dblclick","aria-label","ng-disabled","ui-sref","href","ng-href","rel","target","ng-attr-ui-sref","ui-sref-opts","download"]);e&&(o=o.concat(h.prefixer(e))),de.forEach(o,function(e){t.hasAttribute(e)&&(n.setAttribute(e,t.getAttribute(e)),t.removeAttribute(e))})}function m(e){for(var t=e.attributes,n=0;n<t.length;n++)if("ngClick"===a.$normalize(t[n].name))return!0;return!1}return t=de.element('<div class="md-secondary-container">'),de.forEach(n,function(e){!function(e,t){if(e&&("MD-BUTTON"!=(o=e.nodeName.toUpperCase())&&"BUTTON"!=o)&&e.hasAttribute("ng-click")){u.expect(e,"aria-label");var n=de.element('<md-button class="md-secondary md-icon-button">');c(e,n[0],["ng-if","ng-hide","ng-show"]),e.setAttribute("tabindex","-1"),n.append(e),e=n[0]}var o,i;!e||m(e)&&(a.ngClick||(i=e,-1==g.indexOf(i.nodeName.toLowerCase())))||de.element(e).removeClass("md-secondary"),r.addClass("md-with-secondary"),t.append(e)}(e,t)}),o.append(t),function(){for(var e,t,n=["md-switch","md-checkbox"],o=0;t=n[o];++o)if((e=r.find(t)[0])&&!e.hasAttribute("aria-label")){var i=r.find("p")[0];if(!i)return;e.setAttribute("aria-label","Toggle "+i.textContent)}}(),e&&"MD-MENU"===i.nodeName&&function(){var e=de.element(i),t=e.parent().hasClass("md-secondary-container")||i.parentNode.firstElementChild!==i,n="left";t&&(n="right");e.attr("md-position-mode")||e.attr("md-position-mode",n+" target");var o=e.children().eq(0);m(o[0])||o.attr("ng-click","$mdMenu.open($event)");o.attr("aria-label")||o.attr("aria-label","Open List Menu")}(),function(e,i,t,n){i.addClass("_md");var o=[],r=i[0].firstElementChild,a=i.hasClass("_md-button-wrap")?r.firstElementChild:r,d=a&&m(a),s=i.hasClass("md-no-proxy");r&&r.children&&!d&&!s&&de.forEach(g,function(e){de.forEach(r.querySelectorAll(e+":not(.md-secondary)"),function(e){o.push(e)})}),(1==o.length||d)&&(i.addClass("md-clickable"),d||n.attachRipple(e,de.element(i[0].querySelector(".md-no-style")))),o.length&&de.forEach(o,function(t){t=de.element(t),e.mouseActive=!1,t.on("mousedown",function(){e.mouseActive=!0,f(function(){e.mouseActive=!1},100)}).on("focus",function(){!1===e.mouseActive&&i.addClass("md-focused"),t.on("blur",function e(){i.removeClass("md-focused"),t.off("blur",e)})})});var l=function(e){if("INPUT"!=e.target.nodeName&&"TEXTAREA"!=e.target.nodeName&&!e.target.isContentEditable){var t=e.which||e.keyCode;t==p.KEY_CODE.SPACE&&a&&(a.click(),e.preventDefault(),e.stopPropagation())}};d||o.length||a&&a.addEventListener("keypress",l);i.off("click"),i.off("keypress"),1==o.length&&a&&i.children().eq(0).on("click",function(t){if(!function(e){var t=["md-slider"];if(!e.path)return-1!==t.indexOf(e.target.tagName.toLowerCase());for(var n=e.path.indexOf(i.children()[0]),o=0;o<n;o++)if(-1!==t.indexOf(e.path[o].tagName.toLowerCase()))return!0}(t)){var e=h.getClosest(t.target,"BUTTON");!e&&a.contains(t.target)&&de.forEach(o,function(e){t.target===e||e.contains(t.target)||("MD-MENU"===e.n
vendor: 7,353 bytes, line 10510
10510odeName&&(e=e.children[0]),de.element(e).triggerHandler("click"))})}});e.$on("$destroy",function(){a&&a.removeEventListener("keypress",l)})}}}}function n(e,t,n){this.attachRipple=function(e,t){n.attach(e,t,{})}}n.$inject=["$scope","$element","$mdListInkRipple"],e.$inject=["$mdTheming"],t.$inject=["$mdAria","$mdConstant","$mdUtil","$timeout"],de.module("material.components.list",["material.core"]).controller("MdListController",n).directive("mdList",e).directive("mdListItem",t)}(),de.module("material.components.menuBar",["material.core","material.components.icon","material.components.menu"]),de.module("material.components.menu",["material.core","material.components.backdrop"]),function(){function e(i,r){return{restrict:"E",transclude:!0,controller:t,controllerAs:"ctrl",bindToController:!0,scope:{mdSelectedNavItem:"=?",mdNoInkBar:"=?",navBarAriaLabel:"@?"},template:'<div class="md-nav-bar"><nav role="navigation"><ul class="_md-nav-bar-list" ng-transclude role="tablist" ng-focus="ctrl.onFocus()" aria-label="{{ctrl.navBarAriaLabel}}"></ul></nav><md-nav-ink-bar ng-hide="ctrl.mdNoInkBar"></md-nav-ink-bar></div>',link:function(e,t,n,o){r(t),o.navBarAriaLabel||i.expectAsync(t,"aria-label",de.noop)}}}function t(e,t,n,o){this._$timeout=n,this._$scope=t,this._$mdConstant=o,this.mdSelectedNavItem,this.navBarAriaLabel,this._navBarEl=e[0],this._inkbar;var i=this,r=this._$scope.$watch(function(){return i._navBarEl.querySelectorAll("._md-nav-button").length},function(e){0<e&&(i._initTabs(),r())})}function n(c,e,m,u){return{restrict:"E",require:["mdNavItem","^mdNavBar"],controller:o,bindToController:!0,controllerAs:"ctrl",replace:!0,transclude:!0,template:function(e,t){var n,o,i=t.mdNavClick,r=t.mdNavHref,a=t.mdNavSref,d=t.srefOpts;if(1<(i?1:0)+(r?1:0)+(a?1:0))throw Error("Please do not specify more than one of the md-nav-click, md-nav-href, or md-nav-sref attributes per nav-item directive.");if(i!==se&&null!==i)n='ng-click="ctrl.mdNavClick()"';else if(r!==se&&null!==r)n='ng-href="{{ctrl.mdNavHref}}"';else{if(a===se||null===a)throw Error("Please specify at least one of the md-nav-click, md-nav-href, or md-nav-sref attributes per nav-item directive.");n='ui-sref="{{ctrl.mdNavSref}}"'}return n&&(o='<md-button class="_md-nav-button md-accent" ng-class="ctrl.getNgClassMap()" ng-blur="ctrl.setFocused(false)" ng-disabled="ctrl.disabled" tabindex="-1" role="tab" ng-attr-aria-label="{{ctrl.navItemAriaLabel ? ctrl.navItemAriaLabel : undefined}}" aria-selected="{{ctrl.isSelected()}}" '+(d?'ui-sref-opts="{{ctrl.srefOpts}}" ':"")+n+'><span ng-transclude class="_md-nav-button-text"></span></md-button>'),'<li class="md-nav-item" role="presentation">'+(o||"")+"</li>"},scope:{mdNavClick:"&?",mdNavHref:"@?",mdNavSref:"@?",srefOpts:"=?",name:"@",navItemAriaLabel:"@?"},link:function(n,o,i,r){var a,d,s,l;e(function(){if(d=r[0],s=r[1],l=de.element(o[0].querySelector("._md-nav-button")),d.name||(d.name=de.element(o[0].querySelector("._md-nav-button-text")).text().trim()),l.on("keydown",function(e){s.onKeydown(e)}),l.on("focus",function(){s.getFocusedTab()||s.onFocus()}),l.on("click",function(){s.mdSelectedNavItem=d.name,n.$apply()}),d.disabled=m.parseAttributeBoolean(i.disabled,!1),"MutationObserver"in u){var e=o[0],t=new MutationObserver(function(e){m.nextTick(function(){d.disabled=m.parseAttributeBoolean(i[e[0].attributeName],!1)})});t.observe(e,{attributes:!0,attributeFilter:["disabled"]}),a=t.disconnect.bind(t)}else i.$observe("disabled",function(e){d.disabled=m.parseAttributeBoolean(e,!1)});d.navItemAriaLabel||c.expectWithText(l,"aria-label")}),n.$on("destroy",function(){l.off("keydown"),l.off("focus"),l.off("click"),a()})}}}function o(e){this._$element=e,this.mdNavClick,this.mdNavHref,this.mdNavSref,this.srefOpts,this.name,this.navItemAriaLabel,this._selected=!1,this._focused=!1}e.$inject=["$mdAria","$mdTheming"],t.$inject=["$element","$scope","$timeout","$mdConstant"],n.$inject=["$mdAria","$$rAF","$mdUtil","$window"],o.$inject=["$element"],de.module("material.components.navBar",["material.core"]).controller("MdNavBarController",t).directive("mdNavBar",e).controller("MdNavItemController",o).directive("mdNavItem",n),t.prototype._initTabs=function(){this._inkbar=de.element(this._navBarEl.querySelector("md-nav-ink-bar"));var n=this;this._$timeout(function(){n._updateTabs(n.mdSelectedNavItem,se)}),this._$scope.$watch("ctrl.mdSelectedNavItem",function(e,t){n._$timeout(function(){n._updateTabs(e,t)})})},t.prototype._updateTabs=function(e,t){var n=this,o=this._getTabs();if(o){var i=-1,r=-1,a=this._getTabByName(e),d=this._getTabByName(t);d&&(d.setSelected(!1),i=o.indexOf(d)),a&&(a.setSelected(!0),r=o.indexOf(a)),this._$timeout(function(){n._updateInkBarStyles(a,r,i)})}},t.prototype._updateInkBarStyles=function(e,t,n){if(this._inkbar.toggleClass("_md-left",t<n).toggleClass("_md-right",n<t),this._inkbar.css({display:t<0?"none":""}),e){var o=e.getButtonEl(),i=o.offsetLeft;this._inkbar.css({left:i+"px",width:o.offsetWidth+"px"})}},t.prototype._getTabs=function(){var e=Array.prototype.slice.call(this._navBarEl.querySelectorAll(".md-nav-item")).map(function(e){return de.element(e).controller("mdNavItem")});return e.indexOf(se)?e:null},t.prototype._getTabByName=function(t){return this._findTab(function(e){return e.getName()===t})},t.prototype._getSelectedTab=function(){return this._findTab(function(e){return e.isSelected()})},t.prototype.getFocusedTab=function(){return this._findTab(function(e){return e.hasFocus()})},t.prototype._findTab=function(e,t){var n=this._getTabs();t!==se&&null!==t||(t=0);for(var o=t;o<n.length;o++)if(e(n[o]))return n[o];return null},t.prototype._findTabReverse=function(e,t){var n=this._getTabs();t!==se&&null!==t||(t=n.length-1);for(var o=t;0<=o;o--)if(e(n[o]))return n[o];return null},t.prototype.onFocus=function(){var e=this._getSelectedTab();e&&e.setFocused(!0)},t.prototype._moveFocus=function(e,t){e.setFocused(!1),t.setFocused(!0)},t.prototype._focusFirstTab=function(){if(this._getTabs()){var e=this._findTab(function(e){return e._isEnabled()});e&&this._moveFocus(this.getFocusedTab(),e)}},t.prototype._focusLastTab=function(){if(this._getTabs()){var e=this._findTabReverse(function(e){return e._isEnabled()});e&&this._moveFocus(this.getFocusedTab(),e)}},t.prototype._focusNextTab=function(e){if(this._getTabs()){var t=this._findTab(function(e){return e._isEnabled()},e+1);t?this._moveFocus(this.getFocusedTab(),t):this._focusFirstTab()}},t.prototype._focusPreviousTab=function(e){if(this._getTabs()){var t=this._findTabReverse(function(e){return e._isEnabled()},e-1);t?this._moveFocus(this.getFocusedTab(),t):this._focusLastTab()}},t.prototype.onKeydown=function(e){var t=this._$mdConstant.KEY_CODE,n=this._getTabs(),o=this.getFocusedTab();if(o&&n){var i=n.indexOf(o);switch(e.keyCode){case t.UP_ARROW:case t.LEFT_ARROW:e.preventDefault(),this._focusPreviousTab(i);break;case t.DOWN_ARROW:case t.RIGHT_ARROW:e.preventDefault(),this._focusNextTab(i);break;case t.SPACE:case t.ENTER:this._$timeout(function(){o.getButtonEl().click()});break;case t.HOME:e.preventDefault(),this._focusFirstTab();break;case t.END:e.preventDefault(),this._focusLastTab()}}},o.prototype.getNgClassMap=function(){return{"md-active":this._selected,"md-primary":this._selected,"md-unselected":!this._selected,"md-focused":this._focused}},o.prototype.getName=function(){return this.name}
10510,o.prototype.getButtonEl=function(){return this._$element[0].querySelector("._md-nav-button")},o.prototype.setSelected=function(e){(this._selected=e)?this.getButtonEl().setAttribute("tabindex","0"):this.getButtonEl().setAttribute("tabindex","-1")},o.prototype.isSelected=function(){return this._selected},o.prototype.setFocused=function(e){(this._focused=e)&&this.getButtonEl().focus()},o.prototype.hasFocus=function(){return this._focused},o.prototype._isEnabled=function(){return!this._$element.attr("disabled")}}(),function(){d.$inject=["presets","$rootElement","$rootScope","$injector","$window"],de.module("material.components.panel",["material.core","material.components.backdrop"]).provider("$mdPanel",function(){return{definePreset:e,getAllPresets:t,clearPresets:o,$get:["$rootElement","$rootScope","$injector","$window",function(e,t,n,o){return new d(i,e,t,n,o)}]}});var r=80,a="_md-panel-hidden",n=de.element('<div class="_md-panel-focus-trap" tabindex="0"></div>'),i={};function e(e,t){if(!e||!t)throw new Error("mdPanelProvider: The panel preset definition is malformed. The name and preset object are required.");if(i.hasOwnProperty(e))throw new Error("mdPanelProvider: The panel preset you have requested has already been defined.");delete t.id,delete t.position,delete t.animation,i[e]=t}function t(){return de.copy(i)}function o(){i={}}function d(e,t,n,o,i){this._defaultConfigOptions={bindToController:!0,clickOutsideToClose:!1,disableParentScroll:!1,escapeToClose:!1,focusOnOpen:!0,fullscreen:!1,hasBackdrop:!1,propagateContainerEvents:!1,transformTemplate:de.bind(this,this._wrapTemplate),trapFocus:!1,zIndex:r},this._config={},this._presets=e,this._$rootElement=t,this._$rootScope=n,this._$injector=o,this._$window=i,this._$mdUtil=this._$injector.get("$mdUtil"),this._trackedPanels={},this._groups=Object.create(null),this.animation=l.animation,this.xPosition=h.xPosition,this.yPosition=h.yPosition,this.interceptorTypes=s.interceptorTypes,this.closeReasons=s.closeReasons,this.absPosition=h.absPosition}function s(e,t){this._$q=t.get("$q"),this._$mdCompiler=t.get("$mdCompiler"),this._$mdConstant=t.get("$mdConstant"),this._$mdUtil=t.get("$mdUtil"),this._$mdTheming=t.get("$mdTheming"),this._$rootScope=t.get("$rootScope"),this._$animate=t.get("$animate"),this._$mdPanel=t.get("$mdPanel"),this._$log=t.get("$log"),this._$window=t.get("$window"),this._$$rAF=t.get("$$rAF"),this.id=e.id,this.config=e,this.panelContainer,this.panelEl,this.isAttached=!1,this._removeListeners=[],this._topFocusTrap,this._bottomFocusTrap,this._backdropRef,this._restoreScroll=null,this._interceptors=Object.create(null),this._compilerCleanup=null,this._restoreCache={styles:"",classes:""}}function h(e){this._$window=e.get("$window"),this._isRTL="rtl"===e.get("$mdUtil").bidi(),this._$mdConstant=e.get("$mdConstant"),this._absolute=!1,this._relativeToEl,this._top="",this._bottom="",this._left="",this._right="",this._translateX=[],this._translateY=[],this._positions=[],this._actualPosition}function l(e){this._$mdUtil=e.get("$mdUtil"),this._openFrom,this._closeTo,this._animationClass="",this._openDuration,this._closeDuration,this._rawDuration}function c(e){var t=de.isString(e)?document.querySelector(e):e;return de.element(t)}function m(e){return de.isNumber(e)?e+"px":e}d.prototype.create=function(e,t){if("string"==typeof e?e=this._getPresetByName(e):"object"!=typeof e||!de.isUndefined(t)&&t||(t=e,e={}),e=e||{},t=t||{},de.isDefined(t.id)&&this._trackedPanels[t.id]){var n=this._trackedPanels[t.id];return de.extend(n.config,t),n}this._config=de.extend({id:t.id||"panel_"+this._$mdUtil.nextUid(),scope:this._$rootScope.$new(!0),attachTo:this._$rootElement},this._defaultConfigOptions,t,e);var o=new s(this._config,this._$injector);return this._trackedPanels[t.id]=o,this._config.groupName&&(de.isString(this._config.groupName)&&(this._config.groupName=[this._config.groupName]),de.forEach(this._config.groupName,function(e){o.addToGroup(e)})),this._config.scope.$on("$destroy",de.bind(o,o.detach)),o},d.prototype.open=function(e,t){var n=this.create(e,t);return n.open().then(function(){return n})},d.prototype._getPresetByName=function(e){if(!this._presets[e])throw new Error("mdPanel: The panel preset configuration that you requested does not exist. Use the $mdPanelProvider to create a preset before requesting one.");return this._presets[e]},d.prototype.newPanelPosition=function(){return new h(this._$injector)},d.prototype.newPanelAnimation=function(){return new l(this._$injector)},d.prototype.newPanelGroup=function(e,t){if(!this._groups[e]){var n={panels:[],openPanels:[],maxOpen:0<(t=t||{}).maxOpen?t.maxOpen:1/0};this._groups[e]=n}return this._groups[e]}
vendor: 15,062 bytes, line 10510
10510,d.prototype.setGroupMaxOpen=function(e,t){if(!this._groups[e])throw new Error("mdPanel: Group does not exist yet. Call newPanelGroup().");this._groups[e].maxOpen=t},d.prototype._openCountExceedsMaxOpen=function(e){if(this._groups[e]){var t=this._groups[e];return 0<t.maxOpen&&t.openPanels.length>t.maxOpen}return!1},d.prototype._closeFirstOpenedPanel=function(e){this._groups[e].openPanels[0].close()},d.prototype._wrapTemplate=function(e){return'<div class="md-panel-outer-wrapper"> <div class="md-panel _md-panel-offscreen">'+(e||"")+"</div></div>"},d.prototype._wrapContentElement=function(e){var t=de.element('<div class="md-panel-outer-wrapper">');return e.addClass("md-panel _md-panel-offscreen"),t.append(e),t},s.interceptorTypes={CLOSE:"onClose"},s.prototype.open=function(){var i=this;return this._$q(function(e,t){var n=i._done(e,i),o=i._simpleBind(i.show,i);i.attach().then(o).then(function(){i.config.groupName&&de.forEach(i.config.groupName,function(e){i._$mdPanel._openCountExceedsMaxOpen(e)&&i._$mdPanel._closeFirstOpenedPanel(e)})}).then(n).catch(t)})},s.prototype.close=function(r){var a=this;return this._$q(function(o,i){a._callInterceptors(s.interceptorTypes.CLOSE).then(function(){var e=a._done(o,a),t=a._simpleBind(a.detach,a),n=a.config.onCloseSuccess||de.noop;n=de.bind(a,n,a,r),a.hide().then(t).then(e).then(n).catch(i)},i)})},s.prototype.attach=function(){if(this.isAttached&&this.panelEl)return this._$q.when(this);var i=this;return this._$q(function(e,t){var n=i._done(e,i),o=i.config.onDomAdded||de.noop;i._$q.all([i._createBackdrop(),i._createPanel().then(function(e){return i.isAttached=!0,i._addEventListeners(),e}).catch(t)]).then(o).then(n).catch(t)})},s.prototype.detach=function(){if(!this.isAttached)return this._$q.when(this);var o=this,i=o.config.onDomRemoved||de.noop;return this._restoreScroll&&(this._restoreScroll(),this._restoreScroll=null),this._$q(function(e,t){var n=o._done(e,o);o._$q.all([(o._removeEventListeners(),o._topFocusTrap&&o._topFocusTrap.parentNode&&o._topFocusTrap.parentNode.removeChild(o._topFocusTrap),o._bottomFocusTrap&&o._bottomFocusTrap.parentNode&&o._bottomFocusTrap.parentNode.removeChild(o._bottomFocusTrap),o._restoreCache.classes&&(o.panelEl[0].className=o._restoreCache.classes),o.panelEl[0].style.cssText=o._restoreCache.styles||"",o._compilerCleanup(),o.panelContainer.remove(),o.isAttached=!1,o._$q.when(o)),!o._backdropRef||o._backdropRef.detach()]).then(i).then(n).catch(t)})},s.prototype.destroy=function(){var t=this;this.config.groupName&&de.forEach(this.config.groupName,function(e){t.removeFromGroup(e)}),this.config.scope.$destroy(),this.config.locals=null,this.config.onDomAdded=null,this.config.onDomRemoved=null,this.config.onRemoving=null,this.config.onOpenComplete=null,this._interceptors=null},s.prototype.show=function(){if(!this.panelContainer)return this._$q(function(e,t){t("mdPanel: Panel does not exist yet. Call open() or attach().")});if(!this.panelContainer.hasClass(a))return this._$q.when(this);var i=this;return this._$q(function(e,t){var n=i._done(e,i),o=i.config.onOpenComplete||de.noop;i._$q.all([i._backdropRef?i._backdropRef.show():i,(i.panelContainer.removeClass(a),i._animateOpen()).then(function(){i._focusOnOpen()},t)]).then(o).then(function(){i.config.groupName&&de.forEach(i.config.groupName,function(e){i._$mdPanel._groups[e].openPanels.push(i)})}).then(n).catch(t)})},s.prototype.hide=function(){if(!this.panelContainer)return this._$q(function(e,t){t("mdPanel: Panel does not exist yet. Call open() or attach().")});if(this.panelContainer.hasClass(a))return this._$q.when(this);var i=this;return this._$q(function(e,t){var n=i._done(e,i),o=i.config.onRemoving||de.noop;i._$q.all([i._backdropRef?i._backdropRef.hide():i,i._animateClose().then(o).then(function(){i.panelContainer.addClass(a)}).then(function(){var t;i.config.groupName&&de.forEach(i.config.groupName,function(e){e=i._$mdPanel._groups[e],-1<(t=e.openPanels.indexOf(i))&&e.openPanels.splice(t,1)})}).then(function(){var e=i.config.origin;e&&c(e).focus()}).catch(t)]).then(n,t)})},s.prototype.addClass=function(e,t){if(this._$log.warn("mdPanel: The addClass method is in the process of being deprecated. Full deprecation is scheduled for the AngularJS Material 1.2 release. To achieve the same results, use the panelContainer or panelEl JQLite elements that are referenced in MdPanelRef."),!this.panelContainer)throw new Error("mdPanel: Panel does not exist yet. Call open() or attach().");t||this.panelContainer.hasClass(e)?t&&!this.panelEl.hasClass(e)&&this.panelEl.addClass(e):this.panelContainer.addClass(e)},s.prototype.removeClass=function(e,t){if(this._$log.warn("mdPanel: The removeClass method is in the process of being deprecated. Full deprecation is scheduled for the AngularJS Material 1.2 release. To achieve the same results, use the panelContainer or panelEl JQLite elements that are referenced in MdPanelRef."),!this.panelContainer)throw new Error("mdPanel: Panel does not exist yet. Call open() or attach().");!t&&this.panelContainer.hasClass(e)?this.panelContainer.removeClass(e):t&&this.panelEl.hasClass(e)&&this.panelEl.removeClass(e)},s.prototype.toggleClass=function(e,t){if(this._$log.warn("mdPanel: The toggleClass method is in the process of being deprecated. Full deprecation is scheduled for the AngularJS Material 1.2 release. To achieve the same results, use the panelContainer or panelEl JQLite elements that are referenced in MdPanelRef."),!this.panelContainer)throw new Error("mdPanel: Panel does not exist yet. Call open() or attach().");t?this.panelEl.toggleClass(e):this.panelContainer.toggleClass(e)},s.prototype._compile=function(){var o=this;return o._$mdCompiler.compile(o.config).then(function(e){var t=o.config;if(t.contentElement){var n=e.element;o._restoreCache.styles=n[0].style.cssText,o._restoreCache.classes=n[0].className,o.panelContainer=o._$mdPanel._wrapContentElement(n),o.panelEl=n}else o.panelContainer=e.link(t.scope),o.panelEl=de.element(o.panelContainer[0].querySelector(".md-panel"));return o._compilerCleanup=e.cleanup,c(o.config.attachTo).append(o.panelContainer),o})},s.prototype._createPanel=function(){var n=this;return this._$q(function(e,t){n.config.locals||(n.config.locals={}),(n.config.locals.mdPanelRef=n)._compile().then(function(){n.config.disableParentScroll&&(n._restoreScroll=n._$mdUtil.disableScrollAround(null,n.panelContainer,{disableScrollMask:!0})),n.config.panelClass&&n.panelEl.addClass(n.config.panelClass),n.config.propagateContainerEvents&&(n.panelContainer.css("pointer-events","none"),n.panelEl.css("pointer-events","all")),n._$animate.pin&&n._$animate.pin(n.panelContainer,c(n.config.attachTo)),n._configureTrapFocus(),n._addStyles().then(function(){e(n)},t)},t)})},s.prototype._addStyles=function(){var n=this;return this._$q(function(e){n.panelContainer.css("z-index",n.config.zIndex),n.panelEl.css("z-index",n.config.zIndex+1);var t=function(){n._setTheming(),n.panelEl.removeClass("_md-panel-offscreen"),n.panelContainer.addClass(a),e(n)};if(n.config.fullscreen)return n.panelEl.addClass("_md-panel-fullscreen"),void t();n.config.position?n._$rootScope.$$postDigest(function(){n._updatePosition(!0),n._setTheming(),e(n)}):t()})},s.prototype._setTheming=function(){this._$mdTheming(this.panelEl),this._$mdTheming(this.panelContainer)},s.prototype.updatePosition=function(e){if(!this.panelContainer)throw new Error("mdPanel: Panel does not exist yet. Call open() or attach().");this.config.position=e,this._updatePosition()},s.prototype._updatePosition=function(e){var t=this.config.position;t&&(t._setPanelPosition(this.panelEl),e&&(this.panelEl.removeClass("_md-panel-offscreen"),this.panelContainer.addClass(a)),this.panelEl.css(h.absPosition.TOP,t.getTop()),this.panelEl.css(h.absPosition.BOTTOM,t.getBottom()),this.panelEl.css(h.absPosition.LEFT,t.getLeft()),this.panelEl.css(h.absPosition.RIGHT,t.getRight()))},s.prototype._focusOnOpen=function(){if(this.config.focusOnOpen){var e=this;this._$rootScope.$$postDigest(function(){(e._$mdUtil.findFocusTarget(e.panelEl)||e.panelEl).focus()})}},s.prototype._createBackdrop=function(){if(this.config.hasBackdrop){if(!this._backdropRef){var e=this._$mdPanel.newPanelAnimation().openFrom(this.config.attachTo).withAnimation({open:"_md-opaque-enter",close:"_md-opaque-leave"});this.config.animation&&e.duration(this.config.animation._rawDuration);var t={animation:e,attachTo:this.config.attachTo,focusOnOpen:!1,panelClass:"_md-panel-backdrop",zIndex:this.config.zIndex-1};this._backdropRef=this._$mdPanel.create(t)}if(!this._backdropRef.isAttached)return this._backdropRef.attach()}},s.prototype._addEventListeners=function(){this._configureEscapeToClose(),this._configureClickOutsideToClose(),this._configureScrollListener()},s.prototype._removeEventListeners=function(){this._removeListeners&&this._removeListeners.forEach(function(e){e()}),this._removeListeners=[]},s.prototype._configureEscapeToClose=function(){if(this.config.escapeToClose){var e=c(this.config.attachTo),t=this,n=function(e){e.keyCode===t._$mdConstant.KEY_CODE.ESCAPE&&(e.stopPropagation(),e.preventDefault(),t.close(s.closeReasons.ESCAPE))};this.panelContainer.on("keydown",n),e.on("keydown",n),this._removeListeners.push(function(){t.panelContainer.off("keydown",n),e.off("keydown",n)})}},s.prototype._configureClickOutsideToClose=function(){if(this.config.clickOutsideToClose){var t,n=this.config.propagateContainerEvents?de.element(document.body):this.panelContainer,e=function(e){t=e.target},o=this,i=function(e){o.config.propagateContainerEvents?t===o.panelEl[0]||o.panelEl[0].contains(t)||o.close():t===n[0]&&e.target===n[0]&&(e.stopPropagation(),e.preventDefault(),o.close(s.closeReasons.CLICK_OUTSIDE))};n.on("mousedown",e),n.on("mouseup",i),this._removeListeners.push(function(){n.off("mousedown",e),n.off("mouseup",i)})}},s.prototype._configureScrollListener=function(){if(!this.config.disableParentScroll){var e=de.bind(this,this._updatePosition),t=this._$$rAF.throttle(e),n=this,o=function(){t()};this._$window.addEventListener("scroll",o,!0),this._removeListeners.push(function(){n._$window.removeEventListener("scroll",o,!0)})}},s.prototype._configureTrapFocus=function(){if(this.panelEl.attr("tabIndex","-1"),this.config.trapFocus){var e=this.panelEl;this._topFocusTrap=n.clone()[0],this._bottomFocusTrap=n.clone()[0];var t=function(){e.focus()};this._topFocusTrap.addEventListener("focus",t),this._bottomFocusTrap.addEventListener("focus",t),this._removeListeners.push(this._simpleBind(function(){this._topFocusTrap.removeEventListener("focus",t),this._bottomFocusTrap.removeEventListener("focus",t)},this)),e[0].parentNode.insertBefore(this._topFocusTrap,e[0]),e.after(this._bottomFocusTrap)}},s.prototype.updateAnimation=function(e){this.config.animation=e,this._backdropRef&&this._backdropRef.config.animation.duration(e._rawDuration)},s.prototype._animateOpen=function(){this.panelContainer.addClass("md-panel-is-showing");var n=this.config.animation;if(!n)return this.panelContainer.addClass("_md-panel-shown"),this._$q.when(this);var o=this;return this._$q(function(e){var t=o._done(e,o);n.animateOpen(o.panelEl).then(t,function(){o._$log.warn("mdPanel: MdPanel Animations failed. Showing panel without animating."),t()})})},s.prototype._animateClose=function(){var n=this.config.animation;if(!n)return this.panelContainer.removeClass("md-panel-is-showing"),this.panelContainer.removeClass("_md-panel-shown"),this._$q.when(this);var o=this;return this._$q(function(e){var t=function(){o.panelContainer.removeClass("md-panel-is-showing"),e(o)};n.animateClose(o.panelEl).then(t,function(){o._$log.warn("mdPanel: MdPanel Animations failed. Hiding panel without animating."),t()})})},s.prototype.registerInterceptor=function(e,t){var n=null;if(de.isString(e)?de.isFunction(t)||(n="Interceptor callback must be a function, instead got "+typeof t):n="Interceptor type must be a string, instead got "+typeof e,n)throw new Error("MdPanel: "+n);var o=this._interceptors[e]=this._interceptors[e]||[];return-1===o.indexOf(t)&&o.push(t),this},s.prototype.removeInterceptor=function(e,t){var n=this._interceptors[e]?this._interceptors[e].indexOf(t):-1;return-1<n&&this._interceptors[e].splice(n,1),this},s.prototype.removeAllInterceptors=function(e){return e?this._interceptors[e]=[]:this._interceptors=Object.create(null),this},s.prototype._callInterceptors=function(e){var o=this,i=o._$q;return(o._interceptors&&o._interceptors[e]||[]).reduceRight(function(e,t){var n=t&&de.isFunction(t.then)?t:null;return e.then(function(){if(!n)try{n=t(o)}catch(e){n=i.reject(e)}return n})},i.resolve(o))},s.prototype._simpleBind=function(t,n){return function(e){return t.apply(n,e)}},s.prototype._done=function(e,t){return function(){e(t)}},s.prototype.addToGroup=function(e){this._$mdPanel._groups[e]||this._$mdPanel.newPanelGroup(e);var t=this._$mdPanel._groups[e];t.panels.indexOf(this)<0&&t.panels.push(this)},s.prototype.removeFromGroup=function(e){if(!this._$mdPanel._groups[e])throw new Error("mdPanel: The group "+e+" does not exist.");var t=this._$mdPanel._groups[e],n=t.panels.indexOf(this);-1<n&&t.panels.splice(n,1)},s.closeReasons={CLICK_OUTSIDE:"clickOutsideToClose",ESCAPE:"escapeToClose"},h.xPosition={CENTER:"center",ALIGN_START:"align-start",ALIGN_END:"align-end",OFFSET_START:"offset-start",OFFSET_END:"offset-end"},h.yPosition={CENTER:"center",ALIGN_TOPS:"align-tops",ALIGN_BOTTOMS:"align-bottoms",ABOVE:"above",BELOW:"below"},h.absPosition={TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},h.viewportMargin=8,h.prototype.absolute=function(){return this._absolute=!0,this},h.prototype._setPosition=function(e,t){if(e===h.absPosition.RIGHT||e===h.absPosition.LEFT)this._left=this._right="";else{if(e!==h.absPosition.BOTTOM&&e!==h.absPosition.TOP){var n=Object.keys(h.absPosition).join().toLowerCase();throw new Error("mdPanel: Position must be one of "+n+".")}this._top=this._bottom=""}return this["_"+e]=de.isString(t)?t:"0",this},h.prototype.top=function(e){return this._setPosition(h.absPosition.TOP,e)},h.prototype.bottom=function(e){return this._setPosition(h.absPosition.BOTTOM,e)},h.prototype.start=function(e){var t=this._isRTL?h.absPosition.RIGHT:h.absPosition.LEFT;return this._setPosition(t,e)},h.prototype.end=function(e){var t=this._isRTL?h.absPosition.LEFT:h.absPosition.RIGHT;return this._setPosition(t,e)},h.prototype.left=function(e){return this._setPosition(h.absPosition.LEFT,e)},h.prototype.right=function(e){return this._setPosition(h.absPosition.RIGHT,e)},h.prototype.centerHorizontally=function(){return this._left="50%",this._right="",this._translateX=["-50%"],this},h.prototype.centerVertically=function(){return this._top="50%",this._bottom="",this._translateY=["-50%"],this},h.prototype.center=function(){return this.centerHorizontally().centerVertically()},h.prototype.relativeTo=function(e){return this._absolute=!1,this._relativeToEl=c(e),this},h.prototype.addPanelPosition=function(e,t){if(!this._relativeToEl)throw new Error("mdPanel: addPanelPosition can only be used with relative positioning. Set relativeTo first.");
vendor: 4,788 bytes, line 10510
10510return this._validateXPosition(e),this._validateYPosition(t),this._positions.push({x:e,y:t}),this},h.prototype._validateYPosition=function(e){if(null!=e){for(var t,n=Object.keys(h.yPosition),o=[],i=0;t=n[i];i++){var r=h.yPosition[t];if(o.push(r),r===e)return}throw new Error("mdPanel: Panel y position only accepts the following values:\n"+o.join(" | "))}},h.prototype._validateXPosition=function(e){if(null!=e){for(var t,n=Object.keys(h.xPosition),o=[],i=0;t=n[i];i++){var r=h.xPosition[t];if(o.push(r),r===e)return}throw new Error("mdPanel: Panel x Position only accepts the following values:\n"+o.join(" | "))}},h.prototype.withOffsetX=function(e){return this._translateX.push(m(e)),this},h.prototype.withOffsetY=function(e){return this._translateY.push(m(e)),this},h.prototype.getTop=function(){return this._top},h.prototype.getBottom=function(){return this._bottom},h.prototype.getLeft=function(){return this._left},h.prototype.getRight=function(){return this._right},h.prototype.getTransform=function(){return(this._reduceTranslateValues("translateX",this._translateX)+" "+this._reduceTranslateValues("translateY",this._translateY)).trim()},h.prototype._setTransform=function(e){return e.css(this._$mdConstant.CSS.TRANSFORM,this.getTransform())},h.prototype._isOnscreen=function(e){var t=parseInt(this.getLeft()),n=parseInt(this.getTop());if(this._translateX.length||this._translateY.length){var o=function(e,t){var n=getComputedStyle(e[0]||e)[t],o=n.indexOf("("),i=n.lastIndexOf(")"),r={x:0,y:0};if(-1<o&&-1<i){var a=n.substring(o+1,i).split(", ").slice(-2);r.x=parseInt(a[0]),r.y=parseInt(a[1])}return r}(e,this._$mdConstant.CSS.TRANSFORM);t+=o.x,n+=o.y}var i=t+e[0].offsetWidth,r=n+e[0].offsetHeight;return 0<=t&&0<=n&&r<=this._$window.innerHeight&&i<=this._$window.innerWidth},h.prototype.getActualPosition=function(){return this._actualPosition},h.prototype._reduceTranslateValues=function(n,e){return e.map(function(e){var t=de.isFunction(e)?m(e(this)):e;return n+"("+t+")"},this).join(" ")},h.prototype._setPanelPosition=function(e){if(e.removeClass("_md-panel-position-adjusted"),this._absolute)this._setTransform(e);else{if(this._actualPosition)return this._calculatePanelPosition(e,this._actualPosition),this._setTransform(e),void this._constrainToViewport(e);for(var t=0;t<this._positions.length;t++)if(this._actualPosition=this._positions[t],this._calculatePanelPosition(e,this._actualPosition),this._setTransform(e),this._isOnscreen(e))return;this._constrainToViewport(e)}},h.prototype._constrainToViewport=function(e){var t=h.viewportMargin,n=this._top,o=this._left;if(this.getTop()){var i=parseInt(this.getTop()),r=e[0].offsetHeight+i,a=this._$window.innerHeight;i<t?this._top=t+"px":a<r&&(this._top=i-(r-a+t)+"px")}if(this.getLeft()){var d=parseInt(this.getLeft()),s=e[0].offsetWidth+d,l=this._$window.innerWidth;d<t?this._left=t+"px":l<s&&(this._left=d-(s-l+t)+"px")}e.toggleClass("_md-panel-position-adjusted",this._top!==n||this._left!==o)},h.prototype._reverseXPosition=function(e){if(e===h.xPosition.CENTER)return e;var t="start";return-1<e.indexOf(t)?e.replace(t,"end"):e.replace("end",t)},h.prototype._bidi=function(e){return this._isRTL?this._reverseXPosition(e):e},h.prototype._calculatePanelPosition=function(e,t){var n=e[0].getBoundingClientRect(),o=Math.max(n.width,e[0].clientWidth),i=Math.max(n.height,e[0].clientHeight),r=this._relativeToEl[0].getBoundingClientRect(),a=r.left,d=r.right,s=r.width;switch(this._bidi(t.x)){case h.xPosition.OFFSET_START:this._left=a-o+"px";break;case h.xPosition.ALIGN_END:this._left=d-o+"px";break;case h.xPosition.CENTER:var l=a+.5*s-.5*o;this._left=l+"px";break;case h.xPosition.ALIGN_START:this._left=a+"px";break;case h.xPosition.OFFSET_END:this._left=d+"px"}var c=r.top,m=r.bottom,u=r.height;switch(t.y){case h.yPosition.ABOVE:this._top=c-i+"px";break;case h.yPosition.ALIGN_BOTTOMS:this._top=m-i+"px";break;case h.yPosition.CENTER:var p=c+.5*u-.5*i;this._top=p+"px";break;case h.yPosition.ALIGN_TOPS:this._top=c+"px";break;case h.yPosition.BELOW:this._top=m+"px"}},l.animation={SLIDE:"md-panel-animate-slide",SCALE:"md-panel-animate-scale",FADE:"md-panel-animate-fade"},l.prototype.openFrom=function(e){return e=e.target?e.target:e,this._openFrom=this._getPanelAnimationTarget(e),this._closeTo||(this._closeTo=this._openFrom),this},l.prototype.closeTo=function(e){return this._closeTo=this._getPanelAnimationTarget(e),this},l.prototype.duration=function(e){return e&&(de.isNumber(e)?this._openDuration=this._closeDuration=t(e):de.isObject(e)&&(this._openDuration=t(e.open),this._closeDuration=t(e.close))),this._rawDuration=e,this;function t(e){if(de.isNumber(e))return e/1e3}},l.prototype._getPanelAnimationTarget=function(e){return de.isDefined(e.top)||de.isDefined(e.left)?{element:se,bounds:{top:e.top||0,left
vendor: 2,833 bytes, line 10510
10510:e.left||0}}:this._getBoundingClientRect(c(e))},l.prototype.withAnimation=function(e){return this._animationClass=e,this},l.prototype.animateOpen=function(e){var t=this._$mdUtil.dom.animator;this._fixBounds(e);var n={},o=e[0].style.transform||"",i=t.toTransformCss(o),r=t.toTransformCss(o);switch(this._animationClass){case l.animation.SLIDE:e.css("opacity","1"),n={transitionInClass:"_md-panel-animate-enter"};var a=t.calculateSlideToOrigin(e,this._openFrom)||"";i=t.toTransformCss(a+" "+o);break;case l.animation.SCALE:n={transitionInClass:"_md-panel-animate-enter"};var d=t.calculateZoomToOrigin(e,this._openFrom)||"";i=t.toTransformCss(d+" "+o);break;case l.animation.FADE:n={transitionInClass:"_md-panel-animate-enter"};break;default:n=de.isString(this._animationClass)?{transitionInClass:this._animationClass}:{transitionInClass:this._animationClass.open,transitionOutClass:this._animationClass.close}}return n.duration=this._openDuration,t.translate3d(e,i,r,n)},l.prototype.animateClose=function(e){var t=this._$mdUtil.dom.animator,n={},o=e[0].style.transform||"",i=t.toTransformCss(o),r=t.toTransformCss(o);switch(this._animationClass){case l.animation.SLIDE:e.css("opacity","1"),n={transitionInClass:"_md-panel-animate-leave"};var a=t.calculateSlideToOrigin(e,this._closeTo)||"";r=t.toTransformCss(a+" "+o);break;case l.animation.SCALE:n={transitionInClass:"_md-panel-animate-scale-out _md-panel-animate-leave"};var d=t.calculateZoomToOrigin(e,this._closeTo)||"";r=t.toTransformCss(d+" "+o);break;case l.animation.FADE:n={transitionInClass:"_md-panel-animate-fade-out _md-panel-animate-leave"};break;default:n=de.isString(this._animationClass)?{transitionOutClass:this._animationClass}:{transitionInClass:this._animationClass.close,transitionOutClass:this._animationClass.open}}return n.duration=this._closeDuration,t.translate3d(e,i,r,n)},l.prototype._fixBounds=function(e){var t=e[0].offsetWidth,n=e[0].offsetHeight;this._openFrom&&null==this._openFrom.bounds.height&&(this._openFrom.bounds.height=n),this._openFrom&&null==this._openFrom.bounds.width&&(this._openFrom.bounds.width=t),this._closeTo&&null==this._closeTo.bounds.height&&(this._closeTo.bounds.height=n),this._closeTo&&null==this._closeTo.bounds.width&&(this._closeTo.bounds.width=t)},l.prototype._getBoundingClientRect=function(e){if(e instanceof de.element)return{element:e,bounds:e[0].getBoundingClientRect()}}}(),de.module("material.components.progressCircular",["material.core"]),function(){function e(d,s,l,c){return e.prototype={init:function(e){this._ngModelCtrl=e,this._ngModelCtrl.$render=de.bind(this,this.render)},add:function(e){this._radioButtonRenderFns.push(e)},remove:function(e){var t=this._radioButtonRenderFns.indexOf(e);-1!==t&&this._radioButtonRenderFns.splice(t,1)},render:function(){this._radioButtonRenderFns.forEach(function(e){e()})}
10510,setViewValue:function(e,t){this._ngModelCtrl.$setViewValue(e,t),this.render()},getViewValue:function(){return this._ngModelCtrl.$viewValue},selectNext:function(){return t(this.$element,1)},selectPrevious:function(){return t(this.$element,-1)},setActiveDescendant:function(e){this.$element.attr("aria-activedescendant",e)},isDisabled:function(){return this.$element[0].hasAttribute("disabled")}},{restrict:"E",controller:["$element",e],require:["mdRadioGroup","?ngModel"],link:{pre:function(t,o,e,n){o.addClass("_md"),l(o);var i=n[0],r=n[1]||d.fakeNgModel();function a(){o.hasClass("md-focused")||o.addClass("md-focused")}i.init(r),t.mouseActive=!1,o.attr({role:"radiogroup",tabIndex:o.attr("tabindex")||"0"}).on("keydown",function(e){var t=e.which||e.keyCode;if(t!=s.KEY_CODE.ENTER&&e.currentTarget!=e.target)return;switch(t){case s.KEY_CODE.LEFT_ARROW:case s.KEY_CODE.UP_ARROW:e.preventDefault(),i.selectPrevious(),a();break;case s.KEY_CODE.RIGHT_ARROW:case s.KEY_CODE.DOWN_ARROW:e.preventDefault(),i.selectNext(),a();break;case s.KEY_CODE.ENTER:var n=de.element(d.getClosest(o[0],"form"));0<n.length&&n.triggerHandler("submit")}}).on("mousedown",function(e){t.mouseActive=!0,c(function(){t.mouseActive=!1},100)}).on("focus",function(){!1===t.mouseActive&&i.$element.addClass("md-focused")}).on("blur",function(){i.$element.removeClass("md-focused")})}}};function e(e){this._radioButtonRenderFns=[],this.$element=e}function t(e,t){var n=d.iterator(e[0].querySelectorAll("md-radio-button"),!0);if(n.count()){var o=e[0].querySelector("md-radio-button.md-checked"),i=n[t<0?"previous":"next"](o,function(e){return!de.element(e).attr("disabled")})||n.first();de.element(i).triggerHandler("click")}}}function t(l,c,m){var u="md-checked";return{restrict:"E",require:"^mdRadioGroup",transclude:!0,template:'<div class="md-container" md-ink-ripple md-ink-ripple-checkbox><div class="md-off"></div><div class="md-on"></div></div><div ng-transclude class="md-label"></div>',link:function(t,n,o,i){var r;m(n),e=n,e.attr({id:o.id||"radio_"+c.nextUid(),role:"radio","aria-checked":"false"}),l.expectWithText(e,"aria-label"),o.ngValue?c.nextTick(a,!1):a();var e;function a(){if(!i)throw"RadioButton: No RadioGroupController could be found.";i.add(s),o.$observe("value",s),n.on("click",d).on("$destroy",function(){i.remove(s)})}function d(e){n[0].hasAttribute("disabled")||i.isDisabled()||t.$apply(function(){i.setViewValue(o.value,e&&e.type)})}function s(){var e=i.getViewValue()==o.value;e!==r&&("md-radio-group"!==n[0].parentNode.nodeName.toLowerCase()&&n.parent().toggleClass(u,e),e&&i.setActiveDescendant(n.attr("id")),r=e,n.attr("aria-checked",e).toggleClass(u,e))}}}}e.$inject=["$mdUtil","$mdConstant","$mdTheming","$timeout"],t.$inject=["$mdAria","$mdUtil","$mdTheming"],de.module("material.components.radioButton",["material.core"]).directive("mdRadioGroup",e).directive("mdRadioButton",t)}(),function(){function e(m,u,e){var p="determinate",h="indeterminate",f="buffer",g="query",b="_md-progress-linear-disabled";return{restrict:"E",template:'<div class="md-container"><div class="md-dashed"></div><div class="md-bar md-bar1"></div><div class="md-bar md-bar2"></div></div>',compile:function(e,t,n){return e.attr("aria-valuemin",0),e.attr("aria-valuemax",100),e.attr("role","progressbar"),o}};function o(e,n,o){var t;m(n);var i=o.hasOwnProperty("disabled"),r=u.dom.animator.toCss,a=de.element(n[0].querySelector(".md-bar1")),d=de.element(n[0].querySelector(".md-bar2")),s=de.element(n[0].querySelector(".md-container"));function l(){var e=(o.mdMode||"").trim();if(e)switch(e){case p:case h:case f:case g:break;default:e=h}return e}function c(e,t){if(!i&&l()){var n=u.supplant("translateX({0}%) scale({1},1)",[(t-100)/2,t/100]),o=r({transform:n});de.element(e).css(o)}}n.attr("md-mode",l()).toggleClass(b,i),function(){if(de.isUndefined(o.mdMode)){var e=de.isDefined(o.value),t=e?p:h;n.attr("md-mode",t),o.mdMode=t}}(),o.$observe("value",function(e){var t=v(e);n.attr("aria-valuenow",t),l()!=g&&c(d,t)}),o.$observe("mdBufferValue",function(e){c(a,v(e))}
10510),o.$observe("disabled",function(e){i=!0===e||!1===e?!!e:de.isDefined(e),n.toggleClass(b,i),s.toggleClass(t,!i)}),o.$observe("mdMode",function(e){switch(t&&s.removeClass(t),e){case g:case f:case p:case h:s.addClass(t="md-mode-"+e);break;default:s.addClass(t="md-mode-"+h)}})}function v(e){return Math.max(0,Math.min(e||0,100))}}e.$inject=["$mdTheming","$mdUtil","$log"],de.module("material.components.progressLinear",["material.core"]).directive("mdProgressLinear",e)}(),function(){e.$inject=["$mdSelect","$mdUtil","$mdConstant","$mdTheming","$mdAria","$parse","$sce","$injector"],t.$inject=["$parse","$mdUtil","$mdConstant","$mdTheming"],n.$inject=["$mdButtonInkRipple","$mdUtil","$mdTheming"],o.$inject=["$$interimElementProvider"];var R=8,f=0,c=de.element('<div class="md-container"><div class="md-icon"></div></div>');function e(k,x,N,S,D,I,H,e){var t=N.KEY_CODE;t.SPACE,t.ENTER,t.UP_ARROW,t.DOWN_ARROW;return{restrict:"E",require:["^?mdInputContainer","mdSelect","ngModel","?^form"],compile:function(e,t){var n=de.element("<md-select-value><span></span></md-select-value>");n.append('<span class="md-select-icon" aria-hidden="true"></span>'),n.addClass("md-select-value"),n[0].hasAttribute("id")||n.attr("id","select_value_label_"+x.nextUid());var o=e.find("md-content");o.length||e.append(de.element("<md-content>").append(e.contents()));o.attr("role","presentation"),t.mdOnOpen&&(e.find("md-content").prepend(de.element('<div> <md-progress-circular md-mode="indeterminate" ng-if="$$loadingAsyncDone === false" md-diameter="25px"></md-progress-circular></div>')),e.find("md-option").attr("ng-show","$$loadingAsyncDone"));if(t.name){var i=de.element('<select class="md-visually-hidden"></select>');i.attr({name:t.name,"aria-hidden":"true",tabindex:"-1"});var r=e.find("md-option");de.forEach(r,function(e){var t=de.element("<option>"+e.innerHTML+"</option>");e.hasAttribute("ng-value")?t.attr("ng-value",e.getAttribute("ng-value")):e.hasAttribute("value")&&t.attr("value",e.getAttribute("value")),i.append(t)}),i.append('<option ng-value="'+t.ngModel+'" selected></option>'),e.parent().append(i)}var _=x.parseAttributeBoolean(t.multiple),a=_?"multiple":"",d='<div class="md-select-menu-container" aria-hidden="true" role="presentation"><md-select-menu role="presentation" {0}>{1}</md-select-menu></div>';d=x.supplant(d,[a,e.html()]),e.empty().append(n),e.append(d),t.tabindex||t.$set("tabindex",0);return function(i,n,r,e){var t,o,a,d,s,l=!0,c=e[0],m=e[1],u=e[2],p=e[3],h=n.find("md-select-value"),f=de.isDefined(r.readonly),g=x.parseAttributeBoolean(r.mdNoAsterisk);if(g&&n.addClass("md-no-asterisk"),c){var b=c.isErrorGetter||function(){return u.$invalid&&(u.$touched||p&&p.$submitted)};if(c.input&&n.find("md-select-header").find("input")[0]!==c.input[0])throw new Error("<md-input-container> can only have *one* child <input>, <textarea> or <select> element!");c.input=n,c.label||D.expect(n,"aria-label",n.attr("placeholder")),i.$watch(b,c.setInvalid)}!function(){if(a=de.element(n[0].querySelector(".md-select-menu-container")),d=i,r.mdContainerClass){var e=a[0].getAttribute("class")+" "+r.mdContainerClass;a[0].setAttribute("class",e)}(s=a.find("md-select-menu").controller("mdSelectMenu")).init(u,r.ngModel),n.on("$destroy",function(){a.remove()})}(),S(n);var v,E=u.$render;function $(){a&&(s=s||a.find("md-select-menu").controller("mdSelectMenu"),m.setLabelText(s.selectedLabels()))}function y(){if(o){var e=s.selectedLabels({mode:"aria"});n.attr("aria-label",e.length?o+": "+e:o)}}u.$render=function(){E(),$(),y(),T()},r.$observe("placeholder",u.$render),c&&c.label&&r.$observe("required",function(e){c.label.toggleClass("md-required",e&&!g)}),m.setLabelText=function(e){m.setIsPlaceholder(!e);var t=!1;if(r.mdSelectedText&&r.mdSelectedHtml)throw Error("md-select cannot have both `md-selected-text` and `md-selected-html`");if(r.mdSelectedText||r.mdSelectedHtml)e=I(r.mdSelectedText||r.mdSelectedHtml)(i),t=!0;else if(!e){var n=r.placeholder||(c&&c.label?c.label.text():"");e=n||"",t=!0}var o=h.children().eq(0);r.mdSelectedHtml?o.html(H.getTrustedHtml(e)):t?o.text(e):o.html(e)},m.setIsPlaceholder=function(e){e?(h.addClass("md-select-placeholder"),c&&c.label&&c.label.addClass("md-placeholder")):(h.removeClass("md-select-placeholder"),c&&c.label&&c.label.removeClass("md-placeholder"))},f||(n.on("focus",function(e){c&&c.setFocused(!0)}),n.on("blur",function(e){l&&(l=!1,d._mdSelectIsOpen&&e.stopImmediatePropagation()),d._mdSelectIsOpen||(c&&c.setFocused(!1),T())})),m.triggerClose=function(){I(r.mdOnClose)(i)},i.$$postDigest(function(){!function(){var e=n.attr("aria-label")||n.attr("placeholder");!e&&c&&c.label&&(e=c.label.text());o=e,D.expect(n,"aria-label",e)}(),$(),y()}),i.$watch(function(){return s.selectedLabels()},$),r.$observe("ngMultiple",function(e){v&&v();var t=I(e);
10510v=i.$watch(function(){return t(i)},function(e,t){e===se&&t===se||(e?n.attr("multiple","multiple"):n.removeAttr("multiple"),n.attr("aria-multiselectable",e?"true":"false"),a&&(s.setMultiple(e),E=u.$render,u.$render=function(){E(),$(),y(),T()},u.$render()))})}),r.$observe("disabled",function(e){de.isString(e)&&(e=!0),t!==se&&t===e||((t=e)?n.attr({"aria-disabled":"true"}).removeAttr("tabindex").off("click",w).off("keydown",A):n.attr({tabindex:r.tabindex,"aria-disabled":"false"}).on("click",w).on("keydown",A))}),r.hasOwnProperty("disabled")||r.hasOwnProperty("ngDisabled")||(n.attr({"aria-disabled":"false"}),n.on("click",w),n.on("keydown",A));var C={role:"listbox","aria-expanded":"false","aria-multiselectable":_&&!r.ngMultiple?"true":"false"};n[0].hasAttribute("id")||(C.id="select_"+x.nextUid());var M="select_container_"+x.nextUid();function T(){x.nextTick(function(){c&&c.setHasValue(0<s.selectedLabels().length||(n[0].validity||{}).badInput)})}function A(e){if(N.isNavigationKey(e))e.preventDefault(),w();else if(F(e,N)){e.preventDefault();var t=s.optNodeForKeyboardSearch(e);if(!t||t.hasAttribute("disabled"))return;var n=de.element(t).controller("mdOption");s.isMultiple||s.deselect(Object.keys(s.selected)[0]),s.select(n.hashKey,n.value),s.refreshViewValue()}}function w(){d._mdSelectIsOpen=!0,n.attr("aria-expanded","true"),k.show({scope:d,preserveScope:!0,skipCompile:!0,element:a,target:n[0],selectCtrl:m,preserveElement:!0,hasBackdrop:!0,loadingAsync:!!r.mdOnOpen&&(i.$eval(r.mdOnOpen)||!0)}).finally(function(){d._mdSelectIsOpen=!1,n.focus(),n.attr("aria-expanded","false"),u.$setTouched()})}a.attr("id",M),n.find("md-select-menu").length||(C["aria-owns"]=M),n.attr(C),i.$on("$destroy",function(){k.destroy().finally(function(){c&&(c.setFocused(!1),c.setHasValue(!1),c.input=null),u.$setTouched()})})}},controller:function(){}}}function t(p,h,e,i){return{restrict:"E",require:["mdSelectMenu"],scope:!(t.$inject=["$scope","$attrs","$element"]),controller:t,link:{pre:function(r,e,t,n){var a=n[0];function o(e){var t=h.getClosest(e.target,"md-option"),n=t&&de.element(t).data("$mdOptionController");if(t&&n){if(t.hasAttribute("disabled"))return e.stopImmediatePropagation(),!1;var o=a.hashGetter(n.value),i=de.isDefined(a.selected[o]);r.$apply(function(){a.isMultiple?i?a.deselect(o):a.select(o,n.value):i||(a.deselect(Object.keys(a.selected)[0]),a.select(o,n.value)),a.refreshViewValue()})}}e.addClass("_md"),i(e),e.on("click",o),e.on("keypress",function(e){13!=e.keyCode&&32!=e.keyCode||o(e)})}}};function t(r,e,i){var a,d=this;d.isMultiple=de.isDefined(e.multiple),d.selected={},d.options={},r.$watchCollection(function(){return d.options},function(){d.ngModel.$render()}),d.setMultiple=function(e){var t=d.ngModel;if(a=a||t.$isEmpty,d.isMultiple=e,d.isMultiple){var n=!1,o=function(e){n?m():h.nextTick(function(){m(),n=!0})};t.$validators["md-multiple"]=i,t.$render=o,r.$watchCollection(d.modelBinding,function(e){i(e)&&o()}),t.$isEmpty=function(e){return!e||0===e.length}}else delete t.$validators["md-multiple"],t.$render=u;function i(e,t){return de.isArray(e||t||[])}};var o,s,l,c="";function m(){var n=d.ngModel.$modelValue||d.ngModel.$viewValue||[];if(de.isArray(n)){var e=Object.keys(d.selected),t=n.map(d.hashGetter);e.filter(function(e){return-1===t.indexOf(e)}).forEach(d.deselect),t.forEach(function(e,t){d.select(e,n[t])})}}function u(){var e=d.ngModel.$viewValue||d.ngModel.$modelValue;Object.keys(d.selected).forEach(d.deselect),d.select(d.hashGetter(e),e)}d.optNodeForKeyboardSearch=function(e){o&&clearTimeout(o),o=setTimeout(function(){c="",s=l=o=se},300),c+=e.key;var t=new RegExp("^"+c,"i");s||(s=i.find("md-option"),l=new Array(s.length),de.forEach(s,function(e,t){l[t]=e.textContent.trim()}));for(var n=0;n<l.length;++n)if(t.test(l[n]))return s[n]},d.init=function(e,t){d.ngModel=e,d.modelBinding=t,d.ngModel.$isEmpty=function(e){return!d.options[d.hashGetter(e)]};var n=h.getModelOption(e,"trackBy");if(n){var o={},i=p(n);d.hashGetter=function(e,t){return o.$value=e,i(t||r,o)}}else d.hashGetter=function(e){return de.isObject(e)?"object_"+(e.$$mdSelectId||(e.$$mdSelectId=++f)):e};d.setMultiple(d.isMultiple)},d.selectedLabels=function(e){var t,n=(e=e||{}).mode||"html",o=h.nodesToArray(i[0].querySelectorAll("md-option[selected]"));return o.length?("html"==n?t=function(e){if(e.hasAttribute("md-option-empty"))return"";var t=e.innerHTML,n=e.querySelector(".md-ripple-container");n&&(t=t.replace(n.outerHTML,""));var o=e.querySelector(".md-container");return o&&(t=t.replace(o.outerHTML,"")),t}:"aria"==n&&(t=function(e){return e.hasAttribute("aria-label")?e.getAttribute("aria-label"):e.textContent}),h.uniq(o.map(t)).join(", ")):""},d.select=function(e,t){var n=d.options[e];n&&n.setSelected(!0),d.selected[e]=t},d.deselect=function(e){var t=d.options[e];t&&t.setSelected(!1),delete d.selected[e]},d.addOption=function(e,t){if(de.isDefined(d.options[e]))throw new Error('Duplicate md-option values are not allowed in a select. Duplicate value "'+t.value+'" found.');d.options[e]=t,de.isDefined(d.selected[e])&&(d.select(e,t.value),de.isDefined(d.ngModel.$modelValue)&&d.hashGetter(d.ngModel.$modelValue)===e&&d.ngModel.$validate(),d.refreshViewValue())},d.removeOption=function(e){delete d.options[e]},d.refreshViewValue=function(){var e,t=[];for(var n in d.selected)(e=d.options[n])?t.push(e.value):t.push(d.selected[n]);var o=h.getModelOption(d.ngModel,"trackBy"),i=d.isMultiple?t:t[0],r=d.ngModel.$modelValue;(o?de.equals(r,i):r+""===i)||(d.ngModel.$setViewValue(i),d.ngModel.$render())}}}function n(o,i,l){return e.$inject=["$element"],{restrict:"E",require:["mdOption","^^mdSelectMenu"],controller:e,compile:function(e,t){e.append(de.element('<div class="md-text">').append(e.contents())),e.attr("tabindex",t.tabindex||"0"),n=t,o=n.value,i=n.ngValue,o||i||e.attr("md-option-empty","");var n,o,i;return r}};function r(r,t,e,n){var a=n[0],d=n[1];function s(e,t,n){if(d.hashGetter){var o=d.hashGetter(t,r),i=d.hashGetter(e,r);a.hashKey=i,a.value=e,d.removeOption(o,a),d.addOption(i,a)}else n||r.$$postDigest(function(){s(e,t,!0)})}l(t),d.isMultiple&&(t.addClass("md-checkbox-enabled"),t.prepend(c.clone())),de.isDefined(e.ngValue)?r.$watch(e.ngValue,s):de.isDefined(e.value)?s(e.value):r.$watch(function(){return t.text().trim()},s),e.$observe("disabled",function(e){e?t.attr("tabindex","-1"):t.attr("tabindex","0")}),r.$$postDigest(function(){e.$observe("selected",function(e){de.isDefined(e)&&("string"==typeof e&&(e=!0),e?(d.isMultiple||d.deselect(Object.keys(d.selected)[0]),d.select(a.hashKey,a.value)):d.deselect(a.hashKey),d.refreshViewValue())})}),o.attach(r,t),function(){var e={role:"option","aria-selected":"false"};t[0].hasAttribute("id")||(e.id="select_option_"+i.nextUid());t.attr(e)}(),r.$on("$destroy",function(){d.removeOption(a.hashKey,a)})}function e(t){this.selected=!1,this.setSelected=function(e){e&&!this.selected?t.attr({selected:"selected","aria-selected":"true"}):!e&&this.selected&&(t.removeAttr("selected"),t.attr("aria-selected","false")),this.selected=e}}}function o(e){return t.$inject=["$mdSelect","$mdConstant","$mdUtil","$
10510window","$q","$$rAF","$animateCss","$animate","$document"],e("$mdSelect").setDefaults({methods:["target"],options:t});function t(c,m,H,O,r,u,p,h,P){var f=H.dom.animator,g=m.KEY_CODE;return{parent:"body",themable:!0,onShow:function(a,d,s){return s.loadingAsync&&!s.isRemoved&&(a.$$loadingAsyncDone=!1,r.when(s.loadingAsync).then(function(){a.$$loadingAsyncDone=!0,delete s.loadingAsync}).then(function(){u(i)})),function(e,t){var n=d.find("md-select-menu");if(!t.target)throw new Error(H.supplant("$mdSelect.show() expected a target element in options.target but got '{0}'!",[t.target]));de.extend(t,{isRemoved:!1,target:de.element(t.target),parent:de.element(t.parent),selectEl:n,contentEl:d.find("md-content"),optionNodes:n[0].getElementsByTagName("md-option")})}(0,s),s.hideBackdrop=(t=a,o=s,o.disableParentScroll&&!H.getClosest(o.target,"MD-DIALOG")?o.restoreScroll=H.disableScrollAround(o.element,o.parent):o.disableParentScroll=!1,o.hasBackdrop&&(o.backdrop=H.createBackdrop(t,"md-select-backdrop md-click-catcher"),h.enter(o.backdrop,P[0].body,null,{duration:0})),function(){o.backdrop&&o.backdrop.remove(),o.disableParentScroll&&o.restoreScroll(),delete o.restoreScroll}),(n=d,e=s,e.parent!==n.parent()&&n.parent().attr("aria-owns",n.attr("id")),n.parent().find("md-select-value").attr("aria-hidden","true"),e.parent.append(n),r(function(e,t){try{p(n,{removeClass:"md-leave",duration:0}).start().then(i).then(e)}catch(e){t(e)}})).then(function(e){var t,n,o,i,r;return d.attr("aria-hidden","false"),s.alreadyOpen=!0,s.cleanupInteraction=function(){if(!s.isRemoved){var o=s.selectEl,t=o.controller("mdSelectMenu")||{};return d.addClass("md-clickable"),s.backdrop&&s.backdrop.on("click",e),o.on("keydown",n),o.on("click",r),function(){s.backdrop&&s.backdrop.off("click",e),o.off("keydown",n),o.off("click",r),d.removeClass("md-clickable"),s.isRemoved=!0}}function e(e){e.preventDefault(),e.stopPropagation(),s.restoreFocus=!1,H.nextTick(c.hide,!0)}function n(e){switch(e.preventDefault(),e.stopPropagation(),e.keyCode){case g.UP_ARROW:return void i("prev");case g.DOWN_ARROW:return void i("next");case g.SPACE:case g.ENTER:var t=H.getClosest(e.target,"md-option");t&&(o.triggerHandler({type:"click",target:t}),e.preventDefault()),r(e);break;case g.TAB:case g.ESCAPE:e.stopPropagation(),e.preventDefault(),s.restoreFocus=!0,H.nextTick(c.hide,!0);break;default:if(F(e,m)){var n=o.controller("mdSelectMenu").optNodeForKeyboardSearch(e);s.focusedNode=n||s.focusedNode,n&&n.focus()}}}function i(e){for(var t,n=H.nodesToArray(s.optionNodes),o=n.indexOf(s.focusedNode);-1===o?o=0:"next"===e&&o<n.length-1?o++:"prev"===e&&0<o&&o--,(t=n[o]
10510).hasAttribute("disabled")&&(t=se),!t&&o<n.length-1&&0<o;);t&&t.focus(),s.focusedNode=t}function r(i){if(!(i&&"click"==i.type&&i.currentTarget!=o[0]||function(){var e=!1;if(i&&0<i.currentTarget.children.length){var t=i.currentTarget.children[0],n=t.scrollHeight>t.clientHeight;if(n&&0<t.children.length){var o=i.pageX-i.currentTarget.getBoundingClientRect().left;o>t.querySelector("md-option").offsetWidth&&(e=!0)}}return e}())){var e=H.getClosest(i.target,"md-option");e&&e.hasAttribute&&!e.hasAttribute("disabled")&&(i.preventDefault(),i.stopPropagation(),t.isMultiple||(s.restoreFocus=!0,H.nextTick(function(){c.hide(t.ngModel.$viewValue)},!0)))}}}(),s.cleanupResizing=(o=a,i=d,r=s,t=function(){if(!r.isRemoved){var e=b(o,i,r),t=e.container,n=e.dropDown;t.element.css(f.toCss(t.styles)),n.element.css(f.toCss(n.styles))}},(n=de.element(O)).on("resize",t),n.on("orientationchange",t),function(){n.off("resize",t),n.off("orientationchange",t)}),l(s.focusedNode),e},s.hideBackdrop);var n,e;var t,o;function i(){return r(function(e){if(s.isRemoved)return r.reject(!1);var t=b(a,d,s);t.container.element.css(f.toCss(t.container.styles)),t.dropDown.element.css(f.toCss(t.dropDown.styles)),u(function(){d.addClass("md-active"),t.dropDown.element.css(f.toCss({transform:""})),l(s.focusedNode),e()})})}function l(e){e&&!e.hasAttribute("disabled")&&e.focus()}},onRemove:function(e,t,n){var o=null,i=e.$on("$destroy",function(){o.end()});return(n=n||{}).cleanupInteraction(),n.cleanupResizing(),n.hideBackdrop(),!0===n.$destroy?r():(o=p(t,{addClass:"md-leave"})).start().then(r);function r(){i(),t.removeClass("md-active").attr("aria-hidden","true").css({display:"none",top:"",right:"",bottom:"",left:"","font-size":"","min-width":""}),t.parent().find("md-select-value").removeAttr("aria-hidden"),function(e){var t=e.selectCtrl;if(t){var n=e.selectEl.controller("mdSelectMenu");t.setLabelText(n?n.selectedLabels():""),t.triggerClose()}}(n),!n.$destroy&&n.restoreFocus&&n.target.focus()}},hasBackdrop:!0,disableParentScroll:!0};function b(e,t,n){var o,i,r=t[0],a=n.target[0].children[0],d=P[0].body,s=n.selectEl[0],l=n.contentEl[0],c=d.getBoundingClientRect(),m=a.getBoundingClientRect(),u={left:c.left+R,top:R,bottom:c.height-R,right:c.width-R-(H.floatingScrollbars()?16:0)},p=m.top-u.top,h=(m.left,m.left,m.width,u.bottom-(m.top+m.height)),f=c.width-2*R,g=s.querySelector("md-option[selected]"),b=s.getElementsByTagName("md-option"),v=s.getElementsByTagName("md-optgroup"),E=function(e,t){var n=!1;try{var o=e[0].style.display;e[0].style.display="block",n=t.scrollHeight>t.offsetHeight,e[0].style.display=o}finally{}return n}(t,l);o=(i=n.loadingAsync)&&de.isFunction(i.then)?l.firstElementChild||l:g||(v.length?v[0]:b.length?b[0]:l.firstElementChild||l),l.offsetWidth>f?l.style["max-width"]=f+"px":l.style.maxWidth=null,E&&s.classList.add("md-overflow");var $=o;"MD-OPTGROUP"===($.tagName||"").toUpperCase()&&(o=$=b[0]||l.firstElementChild||l),n.focusedNode=$,r.style.display="block";var y,C,M,T,A,w,_=s.getBoundingClientRect(),k=(y=o)?{left:y.offsetLeft,top:y.offsetTop,width:y.offsetWidth,height:y.offsetHeight}:{left:0,top:0,width:0,height:0};if(o){var x=O.getComputedStyle(o);k.paddingLeft=parseInt(x.paddingLeft,10)||0,k.paddingRight=parseInt(x.paddingRight,10)||0}if(E){var N=l.offsetHeight/2;l.scrollTop=k.top+k.height/2-N,p<N?l.scrollTop=Math.min(k.top,l.scrollTop+N-p):h<N&&(l.scrollTop=Math.max(k.top+k.height-_.height,l.scrollTop-N+h))}C=m.left+k.left-k.paddingLeft+2,M=Math.floor(m.top+m.height/2-k.height/2-k.top+l.scrollTop)+2,T=k.left+m.width/2+"px "+(k.top+k.height/2-l.scrollTop)+"px 0px",A=Math.min(m.width+k.paddingLeft+k.paddingRight,f),w=B.getComputedStyle(a)["font-size"];var S=r.getBoundingClientRect(),D=Math.round(100*Math.min(m.width/_.width,1))/100,I=Math.round(100*Math.min(m.height/_.height,1))/100;return{container:{element:de.element(r),styles:{left:Math.floor(L(u.left,C,u.right-S.width)),top:Math.floor(L(u.top,M,u.bottom-S.height)),"min-width":A,"font-size":w}},dropDown:{element:de.element(s),styles:{transformOrigin:T,transform:n.alreadyOpen?"":H.supplant("scale({0},{1}
10510)",[D,I])}}}}}function L(e,t,n){return Math.max(e,Math.min(t,n))}}function F(e,t){var n=String.fromCharCode(e.keyCode),o=e.keyCode<=31;return n&&n.length&&!o&&!t.isMetaKey(e)&&!t.isFnLockKey(e)&&!t.hasModifierKey(e)}de.module("material.components.select",["material.core","material.components.backdrop"]).directive("mdSelect",e).directive("mdSelectMenu",t).directive("mdOption",n).directive("mdOptgroup",function(){return{restrict:"E",compile:function(t,n){t.parent().find("md-select-header").length||function(){var e=t.find("label");e.length||(e=de.element("<label>"),t.prepend(e));e.addClass("md-container-ignore"),e.attr("aria-hidden","true"),n.label&&e.text(n.label)}()}}}).directive("mdSelectHeader",function(){return{restrict:"E"}}).provider("$mdSelect",o)}(),function(){function e(s,l){return["$mdUtil","$window",function(a,d){return{restrict:"A",multiElement:!0,link:function(o,i,t){var r=o.$on("$md-resize-enable",function(){r();var e=i[0],n=e.nodeType===d.Node.ELEMENT_NODE?d.getComputedStyle(e):{};o.$watch(t[s],function(e){if(!!e===l){a.nextTick(function(){o.$broadcast("$md-resize")});var t={cachedTransitionStyles:n};a.dom.animator.waitTransitionEnd(i,t).then(function(){o.$broadcast("$md-resize")})}})})}}}]}de.module("material.components.showHide",["material.core"]).directive("ngShow",e("ngShow",!0)).directive("ngHide",e("ngHide",!1))}(),function(){function e(o,s,l,i){var c="SideNav '{0}' is not available! Did you use md-component-id='{0}'?",m={find:function(e,t){var n=o.get(e);if(!n&&!t)return i.error(s.supplant(c,[e||""])),se;return n},waitFor:u};return function(e,t){if(de.isUndefined(e))return m;var n,o,i,r,a=!0===t,d=m.find(e,a);return!d&&a?m.waitFor(e):!d&&de.isUndefined(t)?(n=m,o=e,i=function(){return!1},r=function(){return l.when(s.supplant(c,[o||""]))},de.extend({isLockedOpen:i,isOpen:i,toggle:r,open:r,close:r,onClose:de.noop,then:function(e){return u(o).then(e||de.noop)}},n)):d};function u(e){return o.when(e).catch(i.error)}}function t(o,v,i,E,$,y,e,C,M,T,A,w,_){return{restrict:"E",scope:{isOpen:"=?mdIsOpen"},controller:"$mdSidenavController",compile:function(e){return e.addClass("md-closed").attr("tabIndex","-1"),t}};function t(r,a,e,t){var d,s,l,c,m,u=null,p=null,h=T.when(!0),n=C(e.mdIsLockedOpen),f=de.element(w);function g(e){return e.keyCode===i.KEY_CODE.ESCAPE?b(e):T.when(!0)}function b(e){return e.preventDefault(),t.close()}e.mdDisableScrollTarget&&((u=A[0].querySelector(e.mdDisableScrollTarget))?u=de.element(u):M.warn(v.supplant('mdSidenav: couldn\'t find element matching selector "{selector}". Falling back to parent.',{selector:e.mdDisableScrollTarget}))),u||(u=a.parent()),e.hasOwnProperty("mdDisableBackdrop")||(s=v.createBackdrop(r,"md-sidenav-backdrop md-opaque ng-enter")),e.hasOwnProperty("mdDisableCloseEvents")&&(l=!0),a.addClass("_md"),E(a),s&&E.inherit(s,a),a.on("$destroy",function(){s&&s.remove(),t.destroy()}),r.$on("$destroy",function(){s&&s.remove()}),r.$watch(function(){return n(r.$parent,{$media:function(e){return M.warn("$media is deprecated for is-locked-open. Use $mdMedia instead."),o(e)},$mdMedia:o})},function(e,t){(r.isLockedOpen=e)===t?a.toggleClass("md-locked-open",!!e):y[e?"addClass":"removeClass"](a,"md-locked-open");s&&s.toggleClass("md-locked-open",!!e)}),r.$watch("isOpen",function(e){var t,n=v.findFocusTarget(a)||v.findFocusTarget(a,"[md-sidenav-focus]")||a,o=a.parent();l||(o[e?"on":"off"]("keydown",g),s&&s[e?"on":"off"]("click",b));t=function(e,t){var n=a[0],o=e[0].scrollTop;if(t&&o){m={top:n.style.top,bottom:n.style.bottom,height:n.style.height};var i={top:o+"px",bottom:"auto",height:e[0].clientHeight+"px"};a.css(i),s.css(i)}if(!t&&m)return function(){n.style.top=m.top,n.style.bottom=m.bottom,n.style.height=m.height,s[0].style.top=null,s[0].style.bottom=null,s[0].style.height=null,m=null}}(o,e),e&&(p=A[0].activeElement,c=$.getLastInteractionType());return i=e,i&&!d?(d=u.css("overflow"),u.css("overflow","hidden")):de.isDefined(d)&&(u.css("overflow",d),d=se),h=T.all([e&&s?y.enter(s,o):s?y.leave(s):T.when(!0),y[e?"removeClass":"addClass"](a,"md-closed")]).then(function(){r.isOpen&&(_(function(){f.triggerHandler("resize")}),n&&n.focus()),t&&t()});var i}),t.$toggleOpen=function(e){return r.isOpen===e?T.when(!0):(r.isOpen&&t.onCloseCb&&t.onCloseCb(),T(function(t){r.isOpen=e,v.nextTick(function(){h.then(function(e){!r.isOpen&&p&&"keyboard"===c&&(p.focus(),p=null),t(e)})})}))}}}function n(t,e,n,o,i){var r=this;r.isOpen=function(){return!!t.isOpen},r.isLockedOpen=function(){return!!t.isLockedOpen},r.onClose=function(e){return r.onCloseCb=e,r},r.open=function(){return r.$toggleOpen(!0)},r.close=function(){return r.$toggleOpen(!1)},r.toggle=function(){return r.$toggleOpen(!t.isOpen)},r.$toggleOpen=function(e){return o.when(t.isOpen=e)};var a=e.mdComponentId,d=a&&-1<a.indexOf(i.startSymbol()),s=d?i(a)(t.$parent):a;r.destroy=n.register(r,s),d&&e.$observe("mdComponentId",function(e){e&&e!==r.$$mdHandle&&(r.destroy(),r.destroy=n.register(r,e))})}e.$inject=["$mdComponentRegistry","$mdUtil","$q","$log"],t.$inject=["$mdMedia","$mdUtil","$mdConstant","$mdTheming","$mdInteraction","$animate","$compile","$parse","$log","$q","$document","$window","$$rAF"],n.$inject=["$scope","$attrs","$mdComponentRegistry","$q","$interpolate"],de.module("material.components.sidenav",["material.core","material.components.backdrop"]).factory("$mdSidenav",e).directive("mdSidenav",t).directive("mdSidenavFocus",function(){return{restrict:"A",require:"^mdSidenav",link:function(e,t,n,o){}}}).controller("$mdSidenavController",n)}(),function(){e.$inject=["$$rAF","$window","$mdAria","$mdUtil","$mdConstant","$mdTheming","$mdGesture","$parse","$log","$timeout"],de.module("material.components.slider",["material.core"]).directive("mdSli
10510der",e).directive("mdSliderContainer",function(){return{controller:function(){},compile:function(e){var t=e.find("md-slider");if(t){var n=t.attr("md-vertical");return n!==se&&e.attr("md-vertical",""),t.attr("flex")||t.attr("flex",""),function(e,a,t,n){function o(e){a.children().attr("disabled",e),a.find("input").attr("disabled",e)}a.addClass("_md");var d,i=de.noop;t.disabled?o(!0):t.ngDisabled&&(i=e.$watch(t.ngDisabled,function(e){o(e)})),e.$on("$destroy",function(){i()}),n.fitInputWidthToTextLength=function(e){var t=a[0].querySelector("md-input-container");if(t){var n=getComputedStyle(t),o=parseInt(n.minWidth),i=parseInt(n.paddingLeft)+parseInt(n.paddingRight);d=d||parseInt(n.maxWidth);var r=Math.max(d,o+i+o/2*e);t.style.maxWidth=r+"px"}}}}}}});var J=10,ee=4;function e(z,W,i,V,Y,K,G,X,Q,Z){return{scope:{},require:["?ngModel","?^mdSliderContainer"],template:'<div class="md-slider-wrapper"><div class="md-slider-content"><div class="md-track-container"><div class="md-track"></div><div class="md-track md-track-fill"></div><div class="md-track-ticks"></div></div><div class="md-thumb-container"><div class="md-thumb"></div><div class="md-focus-thumb"></div><div class="md-focus-ring"></div><div class="md-sign"><span class="md-thumb-text"></span></div><div class="md-disabled-thumb"></div></div></div></div>',compile:function(e,t){var n=de.element(e[0].getElementsByClassName("md-slider-wrapper")),o=t.tabindex||0;n.attr("tabindex",o),(t.disabled||t.ngDisabled)&&n.attr("tabindex",-1);return e.attr("role","slider"),i.expect(e,"aria-label"),r}};function r(i,r,e,t){K(r);var o=t[0]||{$setViewValue:function(e){this.$viewValue=e,this.$viewChangeListeners.forEach(function(e){e()})},$parsers:[],$formatters:[],$viewChangeListeners:[]},n=t[1],a=(de.element(V.getClosest(r,"_md-slider-container",!0)),e.ngDisabled?de.bind(null,X(e.ngDisabled),i.$parent):function(){return r[0].hasAttribute("disabled")}),d=de.element(r[0].querySelector(".md-thumb")),s=de.element(r[0].querySelector(".md-thumb-text")),l=d.parent(),c=de.element(r[0].querySelector(".md-track-container")),m=de.element(r[0].querySelector(".md-track-fill")),u=de.element(r[0].querySelector(".md-track-ticks")),p=de.element(r[0].getElementsByClassName("md-slider-wrapper")),h=(de.element(r[0].getElementsByClassName("md-slider-content")),V.throttle(S,5e3)),f=de.isDefined(e.mdVertical),g=de.isDefined(e.mdDiscrete),b=de.isDefined(e.mdInvert);de.isDefined(e.min)?e.$observe("min",w):w(0),de.isDefined(e.max)?e.$observe("max",_):_(100),de.isDefined(e.step)?e.$observe("step",k):k(1),de.isDefined(e.round)?e.$observe("round",x):x(3);de.noop;function v(){S(),O()}e.ngDisabled&&i.$parent.$watch(e.ngDisabled,function(){r.attr("aria-disabled",!!a())}),G.register(p,"drag",{horizontal:!f}),i.mouseActive=!1,p.on("keydown",function(e){if(a())return;var t,n=Y.KEY_CODE;switch(e.keyCode){case n.DOWN_ARROW:case n.LEFT_ARROW:e.preventDefault(),t=-y;break;case n.UP_ARROW:case n.RIGHT_ARROW:e.preventDefault(),t=y;break;case n.PAGE_DOWN:e.preventDefault(),t=-y*J;break;case n.PAGE_UP:e.preventDefault(),t=y*J;break;case n.HOME:e.preventDefault(),e.stopPropagation(),I(E);break;case n.END:e.preventDefault(),e.stopPropagation(),I($)}t&&(t=b?-t:t,(e.metaKey||e.ctrlKey||e.altKey)&&(t*=ee),e.preventDefault(),e.stopPropagation(),I(o.$viewValue+t))}).on("mousedown",function(){(function(){if(!g||a())return;if(de.isUndefined(y))return;if(y<=0){var e="Slider step value must be greater than zero when in discrete mode";throw Q.error(e),new Error(e)}var t=Math.floor(($-E)/y);M||(M=de.element("<canvas>").css("position","absolute"),u.append(M),T=M[0].getContext("2d"));var n,o=D();!o||o.height||o.width||(S(),o=N);M[0].width=o.width,M[0].height=o.height;for(var i=0;i<=t;i++){var r=W.getComputedStyle(u[0]);T.fillStyle=r.color||"black",n=Math.floor((f?o.height:o.width)*(i/t)),T.fillRect(f?0:n-1,f?n-1:0,f?o.width:2,f?2:o.height)}})(),i.mouseActive=!0,p.removeClass("md-focused"),Z(function(){i.mouseActive=!1},100)}).on("focus",function(){!1===i.mouseActive&&p.addClass("md-focused")}).on("blur",function(){p.removeClass("md-focused"),r.removeClass("md-active"),function(){if(M&&T){var e=D();T.clearRect(0,0,e.width,e.height)}}()}).on("$md.pressdown",function(e){if(a())return;r.addClass("md-active"),r[0].focus(),S();var t=P(L(U(j(f?e.pointer.y:e.pointer.x))));i.$apply(function(){H(t),R(q(t))})}).on("$md.pressup",function(e){if(a())return;r.removeClass("md-dragging");var t=P(L(U(j(f?e.pointer.y:e.pointer.x))));i.$apply(function(){H(t),O()})}).on("$md.dragstart",function(e){if(a())return;F=!0,e.stopPropagation(),r.addClass("md-dragging"),B(e)}).on("$md.drag",function(e){if(!F)return;e.stopPropagation(),B(e)}).on("$md.dragend",function(e){if(!F)return;e.stopPropagation(),F=!1}),setTimeout(v,0);
vendor: 4,605 bytes, line 10510
10510var E,$,y,C,M,T,A=z.throttle(v);function w(e){E=parseFloat(e),o.$viewValue=P(o.$modelValue,E,$),r.attr("aria-valuemin",e),v()}function _(e){$=parseFloat(e),o.$viewValue=P(o.$modelValue,E,$),r.attr("aria-valuemax",e),v()}function k(e){y=parseFloat(e)}function x(e){C=P(parseInt(e),0,6)}de.element(W).on("resize",A),i.$on("$destroy",function(){de.element(W).off("resize",A)}),o.$render=O,o.$viewChangeListeners.push(O),o.$formatters.push(P),o.$formatters.push(L);var N={};function S(){N=c[0].getBoundingClientRect()}function D(){return h(),N}function I(e){i.$evalAsync(function(){H(e)})}function H(e){o.$setViewValue(P(L(e)))}function O(){isNaN(o.$viewValue)&&(o.$viewValue=o.$modelValue),o.$viewValue=P(o.$viewValue);var e=q(o.$viewValue);i.modelValue=o.$viewValue,r.attr("aria-valuenow",o.$viewValue),R(e),s.text(o.$viewValue)}function P(e,t,n){if(de.isNumber(e))return t=de.isNumber(t)?t:E,n=de.isNumber(n)?n:$,Math.max(t,Math.min(n,e))}function L(e){if(de.isNumber(e)){var t=Math.round((e-E)/y)*y+E;return t=Math.round(t*Math.pow(10,C))/Math.pow(10,C),n&&n.fitInputWidthToTextLength&&V.debounce(function(){n.fitInputWidthToTextLength(t.toString().length)},100)(),t}}function R(e){var t;t=e;var n=100*(e=Math.max(0,Math.min(t||0,1)))+"%",o=b?100*(1-e)+"%":n;f?l.css("bottom",n):V.bidiProperty(l,"left","right",n),m.css(f?"height":"width",o),r.toggleClass(b?"md-max":"md-min",0===e),r.toggleClass(b?"md-min":"md-max",1===e)}S();var F=!1;function B(e){var t,n,o;g?(n=f?e.pointer.y:e.pointer.x,o=P(L(U(j(n)))),R(j(n)),s.text(o)):(t=f?e.pointer.y:e.pointer.x,i.$evalAsync(function(){H(U(j(t)))}))}function j(e){var t=(e-(f?N.top:N.left))/(f?N.height:N.width);return f||"rtl"!==V.bidi()||(t=1-t),Math.max(0,Math.min(1,f?1-t:t))}function U(e){return E+(b?1-e:e)*($-E)}function q(e){var t=(e-E)/($-E);return b?1-t:t}}}}(),function(){function e(l,c,m,d){var s=m.checkStickySupport();return function(e,t,n){var o=t.controller("mdContent");if(o)if(s)t.css({position:s,top:0,"z-index":2});else{var i=o.$element.data("$$sticky");i||(i=function(e){var o,i=e.$element,r=c.throttle(t);return function(e){var t,n,o=200;function i(){+m.now()-n>o?(t=!1,e.triggerHandler("$scrollend")):(e.triggerHandler("$scroll"),c.throttle(i))}e.on("scroll touchmove",function(){t||(t=!0,c.throttle(i),e.triggerHandler("$scrollstart")),e.triggerHandler("$scroll"),n=+m.now()})}(i),i.on("$scrollstart",r),i.on("$scroll",function e(){var t=i.prop("scrollTop"),n=(e.prevScrollTop||0)<t;if(0!==(e.prevScrollTop=t)){if(n){if(o.next&&o.next.top<=t)return void d(o.next);if(o.current&&o.next&&o.next.top-t<=o.next.height)return void s(o.current,t+(o.next.top-o.next.height-t))}if(!n){if(o.current&&o.prev&&t<o.current.top)return void d(o.prev);if(o.next&&o.current&&t>=o.next.top-o.current.height)return void s(o.current,t+(o.next.top-t-o.current.height))}o.current&&s(o.current,t)}else d(null)}),o={prev:null,current:null,next:null,items:[],add:function(n,e){e.addClass("md-sticky-clone");var t={element:n,clone:e};return o.items.push(t),m.nextTick(function(){i.prepend(t.clone)}),r(),function(){o.items.forEach(function(e,t){e.element[0]===n[0]&&(o.items.splice(t,1),e.clone.remove())}),r()}},refreshElements:t};function t(){var e;o.items.forEach(a),o.items=o.items.sort(function(e,t){return e.top<t.top?-1:1});for(var t=i.prop("scrollTop"),n=o.items.length-1;0<=n;n--)if(t>o.items[n].top){e=o.items[n];break}d(e)}function a(e){var t=e.element[0];for(e.top=0,e.left=0,e.right=0;t&&t!==i[0];)e.top+=t.offsetTop,e.left+=t.offsetLeft,t.offsetParent&&(e.right+=t.offsetParent.offsetWidth-t.offsetWidth-t.offsetLeft),t=t.offsetParent;e.height=e.element.prop("offsetHeight");var n=m.floatingScrollbars()?"0":se;m.bidi(e.clone,"margin-left",e.left,n),m.bidi(e.clone,"margin-right",n,e.right)}function d(e){if(o.current!==e){o.current&&(s(o.current,null),n(o.current,null)),e&&n(e,"active"),o.current=e;var t=o.items.indexOf(e);o.next=o.items[t+1],o.prev=o.items[t-1],n(o.next,"next"),n(o.prev,"prev")}}function n(e,t){e&&e.state!==t&&(e.state&&(e.clone.attr("sticky-prev-state",e.state),e.element.attr("sticky-prev-state",e.state)),e.clone.attr("sticky-state",t),e.element.attr("sticky-state",t),e.state=t)}function s(e,t){e&&(null===t||t===se?e.translateY&&(e.translateY=null,e.clone.css(l.CSS.TRANSFORM,"")):(e.translateY=t,m.bidi(e.clone,l.CSS.TRANSFORM,"translate3d("+e.left+"px,"+t+"px,0)","translateY("+t+"px)")))}}(o),o.$element.data("$$sticky",i));var r=n||d(t.clone())(e),a=i.add(t,r);e.$on("$destroy",a)}}}e.$inject=["$mdConstant","$$rAF","$mdUtil","$compile"],de.module("material.components.sticky",["material.core","material.components.c
10510ontent"]).factory("$mdSticky",e)}(),function(){function e(d,s,l,c,m){return{restrict:"E",replace:!0,transclude:!0,template:'<div class="md-subheader _md"> <div class="md-subheader-inner"> <div class="md-subheader-content"></div> </div></div>',link:function(n,o,e,t,i){l(o),o.addClass("_md"),c.prefixer().removeAttribute(o,"ng-repeat");var r=o[0].outerHTML;function a(e){return de.element(e[0].querySelector(".md-subheader-content"))}e.$set("role","heading"),m.expect(o,"aria-level","2"),i(n,function(e){a(o).append(e)}),o.hasClass("md-no-sticky")||i(n,function(e){var t=s('<div class="md-subheader-wrapper" aria-hidden="true">'+r+"</div>")(n);c.nextTick(function(){a(t).append(e)}),d(n,o,t)})}}}e.$inject=["$mdSticky","$compile","$mdTheming","$mdUtil","$mdAria"],de.module("material.components.subheader",["material.core","material.components.sticky"]).directive("mdSubheader",e)}(),function(){function e(e){t.$inject=["$parse"];var r="md"+e,a="$md."+e.toLowerCase();return t;function t(i){return{restrict:"A",link:function(n,e,t){var o=i(t[r]);e.on(a,function(e){var t=e.currentTarget;n.$applyAsync(function(){o(n,{$event:e,$target:{current:t}})})})}}}}de.module("material.components.swipe",["material.core"]).directive("mdSwipeLeft",e("SwipeLeft")).directive("mdSwipeRight",e("SwipeRight")).directive("mdSwipeUp",e("SwipeUp")).directive("mdSwipeDown",e("SwipeDown"))}(),function(){function e(e,m,u,p,h,f,g){var n=e[0];return{restrict:"E",priority:u.BEFORE_NG_ARIA,transclude:!0,template:'<div class="md-container"><div class="md-bar"></div><div class="md-thumb-container"><div class="md-thumb" md-ink-ripple md-ink-ripple-checkbox></div></div></div><div ng-transclude class="md-label"></div>',require:["^?mdInputContainer","?ngModel","?^form"],compile:function(e,t){var c=n.compile(e,t).post;return e.addClass("md-dragging"),function(n,o,e,t){t[0];var i=t[1]||m.fakeNgModel(),r=(t[2],null);null!=e.disabled?r=function(){return!0}:e.ngDisabled&&(r=p(e.ngDisabled));var a,d=de.element(o[0].querySelector(".md-thumb-container")),s=de.element(o[0].querySelector(".md-container")),l=de.element(o[0].querySelector(".md-label"));h(function(){o.removeClass("md-dragging")}),c(n,o,e,t),r&&n.$watch(r,function(e){o.attr("tabindex",e?-1:0)}),e.$observe("mdInvert",function(e){var t=m.parseAttributeBoolean(e);t?o.prepend(l):o.prepend(s),o.toggleClass("md-inverted",t)}),f.register(s,"drag"),s.on("$md.dragstart",function(e){r&&r(n)||(e.stopPropagation(),o.addClass("md-dragging"),a={width:d.prop("offsetWidth")})}).on("$md.drag",function(e){if(a){e.stopPropagation(),e.srcEvent&&e.srcEvent.preventDefault();var t=e.pointer.distanceX/a.width,n=i.$viewValue?1+t:t;n=Math.max(0,Math.min(1,n)),d.css(u.CSS.TRANSFORM,"translate3d("+100*n+"%,0,0)"),a.translate=n}}).on("$md.dragend",function(e){var t;a&&(e.stopPropagation(),o.removeClass("md-dragging"),d.css(u.CSS.TRANSFORM,""),(i.$viewValue?a.translate<.5:.5<a.translate)&&(t=!i.$viewValue,n.$apply(function(){i.$setViewValue(t),i.$render()})),a=null,n.skipToggle=!0,g(function(){n.skipToggle=!1},1))})}}}}e.$inject=["mdCheckboxDirective","$mdUtil","$mdConstant","$parse","$$rAF","$mdGesture","$timeout"],de.module("material.components.switch",["material.core","material.components.checkbox"]).directive("mdSwitch",e)}(),de.module("material.components.tabs",["material.core","material.components.icon"]),de.module("material.components.tabs").service("MdTabsPaginationService",function(){return{decreasePageOffset:function(e,t){var n,o,i=e.canvas,r=d(e);for(n=0;n<r.length;n++)if(r[n]>=t){o=r[n];break}return Math.max(0,o-i.clientWidth)},increasePageOffset:function(e,t){var n,o,i=e.canvas,r=s(e)-i.clientWidth,a=d(e);for(n=0;a.length,a[n]<=t+i.clientWidth;n++)o=a[n];return Math.min(r,o)},getTabOffsets:d,getTotalTabsWidth:s};function d(e){var t,n,o=0,i=[];for(t=0;t<e.tabs.length;t++)n=e.tabs[t],i.push(o),o+=n.offsetWidth;return i}function s(e){var t,n,o=0;for(t=0;t<e.tabs.length;t++)n=e.tabs[t],o+=n.offsetWidth;return o}}),function(){function e(n){return{restrict:"E",link:function(e,t){t.addClass("_md"),e.$on("$destroy",function(){n.destroy()})}}}function t(e){n.$inject=["$mdToast","$scope","$log"],o.$inject=["$animate","$mdToast","$mdUtil","$mdMedia","$document"];var u,p="ok";function t(e){u=e}return e("$mdToast").setDefaults({methods:["position","hideDelay","capsule","parent","position","toastClass"],options:o}).addPreset("simple",{argOption:"textContent",methods:["textContent","content","action","actionKey","actionHint","highlightAction","highlightClass","theme","parent","dismissHint"],options:["$mdToast","$mdTheming",function(e,t){return{template:'<md-toast md-theme="{{ toast.theme }}" ng-class="{\'md-capsule\': toast.capsule}"> <div class="md-toast-content" aria-live="polite" aria-relevant="all"> <span class="md-toast-text"> {{ toast.content }} </span> <span class="md-visually-hidden">{{ toast.dismissHint }}</span> <span class="md-visually-hidden" ng-if="toast.action && toast.actionKey"> {{ toast.actionHint }} </span> <md-button class="md-action" ng-if="toast.action" ng-click="toast.resolve()" ng-class="highlightClasses"> {{ toast.action }} </md-button> </div></md-toast>',controller:n,theme:t.defaultTheme(),controllerAs:"toast",bindToController:!0}}]}).addMethod("updateTextContent",t).addMethod("updateContent",t);function n(t,n,o){this.$onInit=function(){var e=this;e.highlightAction&&(n.highlightClasses=["md-highlight",e.highlightClass]),e.action&&!e.actionKey&&o.warn("Toasts with actions should define an actionKey for accessibility.","Details: https://material.angularjs.org/latest/api/service/$mdToast#mdtoast-simple"),e.actionKey&&!e.actionHint&&(e.actionHint='Press Control-"'+e.actionKey+'" to '),e.dismissHint||(e.dismissHint="Press Escape to dismiss."),n.$watch(function(){return u},function(){e.content=u}),this.resolve=function(){t.hide(p)}}}function o(o,d,s,l,c){var m="$md.swipeleft $md.swiperight $md.swipeup $md.swipedown";return{onShow:function(e,i,r){u=r.textContent||r.content;var a=!l("gt-sm");i=s.extractElementByName(i,"md-toast",!0),r.element=i,r.onSwipe=function(e,t){var n=e.type.replace("$md.",""),o=n.replace("swipe","");"down"===o&&-1!==r.position.indexOf("top")&&!a||"up"===o&&(-1!==r.position.indexOf("bottom")||a)||("left"!==o&&"right"!==o||!a)&&(i.addClass("md-"+n),s.nextTick(d.cancel))},r.openClass=(t=r.position,l("gt-xs")?"md-toast-open-"+(-1<t.indexOf("top")?"top":"bottom"):"md-toast-open-bottom"),i.addClass(r.toastClass),r.parent.addClass(r.openClass),s.hasComputedStyle(r.parent,"position","static")&&r.parent.css("position","relative");var t;n=e.toast&&e.toast.actionKey?e.toast.actionKey:se,c.on("keydown",function(e){"Escape"===e.key&&d.hide(!1),n&&e.key===n&&e.ctrlKey&&d.hide(p)}),i.on(m,r.onSwipe),i.addClass(a?"md-bottom":r.position.split(" ").map(function(e){return"md-"+e}).join(" ")),r.parent&&r.parent.addClass("md-toast-animating");var n;return o.enter(i,r.parent).then(function(){r.parent&&r.parent.removeClass("md-toast-animating")})},onRemove:function(e,t,n){e.toast&&e.toast.actionKey&&c.off("keydown");t.off(m,n.onSwipe),n.parent&&n.parent.addClass("md-toast-animating");n.openClass&&n.parent.removeClass(n.openClass);return(!0===n.$destroy?t.remove():o.leave(t)).then(function(){n.parent&&n.parent.removeClass("md-toast-animating"),s.hasComputedStyle(n.parent,"position","static")&&n.parent.css("position","")})},toastClass:"",position:"bottom left",themable:!0,hideDelay:3e3,autoWrap:!0,transformTemplate:function(e,t){if(t.autoWrap&&e&&!/md-toast-content/g.test(e)){var n=document.createElement("md-template");n.innerHTML=e;for(var o=0;o<n.children.length;o++)if("MD-TOAST"===n.children[o].nodeName){var i=de.element('<div class="md-toast-content">');i.append(de.element(n.children[o].childNodes)),n.children[o].appendChild(i[0])}return n.innerHTML}return e||""}}}}e.$inject=["$mdToast"],t.$inject=["$$interimElementProvider"],de.module("material.components.toast",["material.core","material.components.button"]).directive("mdToast",e).provider("$mdToast",t)}(),function(){function e(f,g,b,e,v){var E=de.bind(null,b.supplant,"translate3d(0,{0}px,0)");return{template:"",restrict:"E",link:function(u,p,h){p.addClass("_md"),e(p),b.nextTick(function(){p.addClass("_md-toolbar-transitions")},!1),de.isDefined(h.mdScrollShrink)&&function(){var n,o,i=de.noop,r=0,a=0,d=h.mdShrinkSpeedFactor||.5,s=f.throttle(t),l=b.debounce(e,5e3);u.$on("$mdContentLoaded",c),h.$observe("mdScrollShrink",function(e){var t=p.parent().find("md-content");!o&&t.length&&c(null,t),!1===(e=u.$eval(e))?i():i=m()}),h.ngShow&&u.$watch(h.ngShow,e);h.ngHide&&u.$watch(h.ngHide,e);function c(e,t){t&&p.parent()[0]===t.parent()[0]&&(o&&o.off("scroll",s),o=t,i=m())}function t(e){var t=e?e.target.scrollTop:a;l(),r=Math.min(n/d,Math.max(0,r+t-a)),p.css(g.CSS.TRANSFORM,E([-r*d])),o.css(g.CSS.TRANSFORM,E([(n-r)*d])),a=t,b.nextTick(function(){var e=p.hasClass("md-whiteframe-z1");e&&!r?v.removeClass(p,"md-whiteframe-z1"):!e&&r&&v.addClass(p,"md-whiteframe-z1")})}function m(){return o?(o.on("scroll",s),o.attr("scroll-shrink","true"),b.nextTick(e,!1),function(){o.off("scroll",s),o.attr("scroll-shrink","false"),e()}):de.noop}function e(){var e=-(n=p.prop("offsetHeight"))*d+"px";o.css({"margin-top":e,"margin-bottom":e}),t()}u.$on("$destroy",i)}()}}}e.$inject=["$$rAF","$mdConstant","$mdUtil","$mdTheming","$animate"],de.module("material.components.toolbar",["material.core","material.components.c
10510ontent"]).directive("mdToolbar",e)}(),function(){function e(v,E,$,y,C,M,T,A){var w="focus touchstart mouseenter",_="blur touchcancel mouseleave",k={top:{x:T.xPosition.CENTER,y:T.yPosition.ABOVE},right:{x:T.xPosition.OFFSET_END,y:T.yPosition.CENTER},bottom:{x:T.xPosition.CENTER,y:T.yPosition.BELOW},left:{x:T.xPosition.OFFSET_START,y:T.yPosition.CENTER}};return{restrict:"E",priority:210,scope:{mdZIndex:"=?mdZIndex",mdDelay:"=?mdDelay",mdVisible:"=?mdVisible",mdAutohide:"=?mdAutohide",mdDirection:"@?mdDirection"},link:function(a,o,d){var i,e,r,s,l,c="md-tooltip-"+M.nextUid(),m=M.getParentWithPointerEvents(o),u=$.throttle(f),p=!1,h=null;function t(){a.mdZIndex=a.mdZIndex||100,a.mdDelay=a.mdDelay||0,k[a.mdDirection]||(a.mdDirection="bottom")}function n(e){var t=e||C(o.text().trim())(a.$parent);(!m.attr("aria-label")&&!m.attr("aria-labelledby")||m.attr("md-labeled-by-tooltip"))&&(m.attr("aria-label",t),m.attr("md-labeled-by-tooltip")||m.attr("md-labeled-by-tooltip",c))}function f(){t(),s&&s.panelEl&&s.panelEl.removeClass(i),i="md-origin-"+a.mdDirection,e=k[a.mdDirection],r=T.newPanelPosition().relativeTo(m).addPanelPosition(e.x,e.y),s&&s.panelEl&&(s.panelEl.addClass(i),s.updatePosition(r))}function g(e){g.queued&&g.value===!!e||!g.queued&&a.mdVisible===!!e||(g.value=!!e,g.queued||(e?(g.queued=!0,l=v(function(){a.mdVisible=g.value,g.queued=!1,l=null,a.visibleWatcher||b(a.mdVisible)},a.mdDelay)):M.nextTick(function(){a.mdVisible=!1,a.visibleWatcher||b(!1)})))}function b(e){e?function(){if(!o[0].textContent.trim())throw new Error("Text for the tooltip has not been provided. Please include text within the mdTooltip element.");if(!s){var e=de.element(document.body),t=T.newPanelAnimation().openFrom(m).closeTo(m).withAnimation({open:"md-show",close:"md-hide"}),n={id:c,attachTo:e,contentElement:o,propagateContainerEvents:!0,panelClass:"md-tooltip",animation:t,position:r,zIndex:a.mdZIndex,focusOnOpen:!1,onDomAdded:function(){s.panelEl.addClass(i)}};s=T.create(n)}s.open().then(function(){s.panelEl.attr("role","tooltip")})}():s&&s.close()}t(),n(),o.detach(),f(),function(){if(m[0]&&"MutationObserver"in E){var e=new MutationObserver(function(e){e.some(function(e){return"disabled"===e.attributeName&&m[0].disabled})});e.observe(m[0],{attributes:!0})}function t(){g(!1)}function n(){h=document.activeElement===m[0]}function o(e){"focus"===e.type&&h?h=!1:a.mdVisible||(m.on(_,i),g(!0),"touchstart"===e.type&&m.one("touchend",function(){M.nextTick(function(){y.one("touchend",i)},!1)}))}function i(){((a.hasOwnProperty("mdAutohide")?a.mdAutohide:d.hasOwnProperty("mdAutohide"))||p||y[0].activeElement!==m[0])&&(l&&(v.cancel(l),g.queued=!1,l=null),m.off(_,i),m.triggerHandler("blur"),g(!1)),p=!1}function r(){p=!0}h=!1,A.register("scroll",t,!0),A.register("blur",n),A.register("resize",u),a.$on("$destroy",function(){A.deregister("scroll",t,!0),A.deregister("blur",n),A.deregister("resize",u),m.off(w,o).off(_,i).off("mousedown",r),i(),e&&e.disconnect()}),m.on("mousedown",r),m.on(w,o)}(),function(){if(o[0]&&"MutationObserver"in E){var e=new MutationObserver(function(e){e.forEach(function(e){"md-visible"!==e.attributeName||a.visibleWatcher||(a.visibleWatcher=a.$watch("mdVisible",b))})});e.observe(o[0],{attributes:!0}),d.hasOwnProperty("mdVisible")&&(a.visibleWatcher=a.$watch("mdVisible",b))}else a.visibleWatcher=a.$watch("mdVisible",b);a.$watch("mdDirection",f),o.one("$destroy",t),m.one("$destroy",t),a.$on("$destroy",function(){g(!1),s&&s.destroy(),e&&e.disconnect(),o.remove()}),-1<o.text().indexOf(C.startSymbol())&&a.$watch(function(){return o.text().trim()},n);function t(){a.$destroy()}}()}}}e.$inject=["$timeout","$window","$$rAF","$document","$interpolate","$mdUtil","$mdPanel","$$mdTooltipRegistry"],de.module("material.components.tooltip",["material.core","material.components.panel"]).directive("mdTooltip",e).service("$$mdTooltipRegistry",function(){var r={},a=de.element(B);return{register:function(e,t,n){var o=r[e]=r[e]||[];o.length||(n?B.addEventListener(e,d,!0):a.on(e,d));-1===o.indexOf(t)&&o.push(t)},deregister:function(e,t,n){var o=r[e],i=o?o.indexOf(t):-1;-1<i&&(o.splice(i,1),0===o.length&&(n?B.removeEventListener(e,d,!0):a.off(e,d)))}};function d(t){r[t.type]&&r[t.type].forEach(function(e){e.call(this,t)},this)}})}(),function(){function e(e){e.addClass("md-truncate")}e.$inject=["$element"],de.module("material.components.truncate",["material.core"]).directive("mdTruncate",function(){return{restrict:"AE",controller:e}})}(),function(){function e(e){return'<div class="md-virtual-repeat-scroller" role="presentation"><div class="md-virtual-repeat-sizer" role="presentation"></div><div class="md-virtual-repeat-offsetter" role="presentation">'+e[0].innerHTML+"</div></div>"}t.$inject=["$$rAF","$mdUtil","$mdConstant","$parse","$rootScope","$
10510window","$scope","$element","$attrs"],i.$inject=["$scope","$element","$attrs","$browser","$document","$rootScope","$$rAF","$mdUtil"],n.$inject=["$parse"],de.module("material.components.virtualRepeat",["material.core","material.components.showHide"]).directive("mdVirtualRepeatContainer",function(){return{controller:t,template:e,compile:function(e,t){e.addClass("md-virtual-repeat-container").addClass(t.hasOwnProperty("mdOrientHorizontal")?"md-orient-horizontal":"md-orient-vertical")}}}).directive("mdVirtualRepeat",n).directive("mdForceHeight",r);function t(e,n,t,o,i,r,a,d,s){this.$rootScope=i,this.$scope=a,this.$element=d,this.$attrs=s,this.size=0,this.scrollSize=0,this.scrollOffset=0,this.horizontal=this.$attrs.hasOwnProperty("mdOrientHorizontal"),this.repeater=null,this.autoShrink=this.$attrs.hasOwnProperty("mdAutoShrink"),this.autoShrinkMin=parseInt(this.$attrs.mdAutoShrinkMin,10)||0,this.originalSize=null,this.offsetSize=parseInt(this.$attrs.mdOffsetSize,10)||0,this.oldElementSize=null,this.maxElementPixels=t.ELEMENT_MAX_PIXELS,this.$attrs.mdTopIndex?(this.bindTopIndex=o(this.$attrs.mdTopIndex),this.topIndex=this.bindTopIndex(this.$scope),de.isDefined(this.topIndex)||(this.topIndex=0,this.bindTopIndex.assign(this.$scope,0)),this.$scope.$watch(this.bindTopIndex,de.bind(this,function(e){e!==this.topIndex&&this.scrollToIndex(e)}))):this.topIndex=0,this.scroller=d[0].querySelector(".md-virtual-repeat-scroller"),this.sizer=this.scroller.querySelector(".md-virtual-repeat-sizer"),this.offsetter=this.scroller.querySelector(".md-virtual-repeat-offsetter");var l=de.bind(this,this.updateSize);e(de.bind(this,function(){l();var e=n.debounce(l,10,null,!1),t=de.element(r);this.size||e(),t.on("resize",e),a.$on("$destroy",function(){t.off("resize",e)}),a.$emit("$md-resize-enable"),a.$on("$md-resize",l)}))}function n(o){return{controller:i,priority:1e3,require:["mdVirtualRepeat","^^mdVirtualRepeatContainer"],restrict:"A",terminal:!0,transclude:"element",compile:function(e,t){var n=t.mdVirtualRepeat.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)\s*$/),r=n[1],a=o(n[2]),d=t.mdExtraName&&o(t.mdExtraName);return function(e,t,n,o,i){o[0].link_(o[1],i,r,a,d)}}}}function i(e,t,n,o,i,r,a,d){this.$scope=e,this.$element=t,this.$attrs=n,this.$browser=o,this.$document=i,this.$mdUtil=d,this.$rootScope=r,this.$$rAF=a,this.onDemand=d.parseAttributeBoolean(n.mdOnDemand),this.browserCheckUrlChange=o.$$checkUrlChange,this.newStartIndex=0,this.newEndIndex=0,this.newVisibleEnd=0,this.startIndex=0,this.endIndex=0,this.itemSize=e.$eval(n.mdItemSize)||null,this.isFirstRender=!0,this.isVirtualRepeatUpdating_=!1,this.itemsLength=0,this.unwatchItemSize_=de.noop,this.blocks={},this.pooledBlocks=[],e.$on("$destroy",de.bind(this,this.cleanupBlocks_))}function o(e){if(!de.isFunction(e.getItemAtIndex)||!de.isFunction(e.getLength))throw Error("When md-on-demand is enabled, the Object passed to md-virtual-repeat must implement functions getItemAtIndex() and getLength().");this.model=e}function r(e){return{restrict:"A",link:function(e,t,n){var o=e.$eval(n.mdForceHeight)||null;o&&t&&(t[0].style.height=o)}}}t.prototype.register=function(e){this.repeater=e,de.element(this.scroller).on("scroll wheel touchmove touchend",de.bind(this,this.handleScroll_))},t.prototype.isHorizontal=function(){return this.horizontal},t.prototype.getSize=function(){return this.size},t.prototype.setSize_=function(e){var t=this.getDimensionName_();this.size=e,this.$element[0].style[t]=e+"px"},t.prototype.unsetSize_=function(){this.$element[0].style[this.getDimensionName_()]=this.oldElementSize,this.oldElementSize=null},t.prototype.updateSize=function(){if(!this.originalSize){var e=this.isHorizontal()?this.$element[0].clientWidth:this.$element[0].clientHeight;e&&(this.size=e),this.handleScroll_(),this.repeater&&this.repeater.containerUpdated()}},t.prototype.getScrollSize=function(){return this.scrollSize},t.prototype.getDimensionName_=function(){return this.isHorizontal()?"width":"height"},t.prototype.sizeScroller_=function(e){var t=this.getDimensionName_(),n=this.isHorizontal()?"height":"width";if(this.sizer.innerHTML="",e<this.maxElementPixels)this.sizer.style[t]=e+"px";else{this.sizer.style[t]="auto",this.sizer.style[n]="auto";var o=Math.floor(e/this.maxElementPixels),i=document.createElement("div");i.style[t]=this.maxElementPixels+"px",i.style[n]="1px";for(var r=0;r<o;r++)this.sizer.appendChild(i.cloneNode(!1));i.style[t]=e-o*this.maxElementPixels+"px",this.sizer.appendChild(i)}},t.prototype.autoShrink_=function(e){var t=Math.max(e,this.autoShrinkMin*this.repeater.getItemSize());if(this.autoShrink&&t!==this.size){null===this.oldElementSize&&(this.oldElementSize=this.$element[0].style[this.getDimensionName_()]);var n=this.originalSize||this.size;if(!n||t<n)this.originalSize||(this.originalSize=this.size),this.setSize_(t);else if(null!==this.originalSize){this.unsetSize_();var o=this.originalSize;this.originalSize=null,o||this.updateSize(),this.setSize_(o||this.size)}this.repeater.containerUpdated()}},t.prototype.setScrollSize=function(e){var t=e+this.offsetSize;this.scrollSize!==t&&(this.sizeScroller_(t),this.autoShrink_(t),this.scrollSize=t)},t.prototype.getScrollOffset=function(){return this.scrollOffset},t.prototype.scrollTo=function(e){this.scroller[this.isHorizontal()?"scrollLeft":"scrollTop"]=e,this.handleScroll_()},t.prototype.scrollToIndex=function(e){var t=this.repeater.getItemSize(),n=this.repeater.itemsLength;n<e&&(e=n-1),this.scrollTo(t*e)},t.prototype.resetScroll=function(){this.scrollTo(0)},t.prototype.handleScroll_=function(){var e="rtl"!==document.dir&&"rtl"!==document.body.dir;e||this.maxSize||(this.scroller.scrollLeft=this.scrollSize,this.maxSize=this.scroller.scrollLeft);var t=this.isHorizontal()?e?this.scroller.scrollLeft:this.maxSize-this.scroller.scrollLeft:this.scroller.scrollTop;if(!(t===this.scrollOffset||t>this.scrollSize-this.size)){var n=this.repeater.getItemSize();if(n){var o=Math.max(0,Math.floor(t/n)-3),i=(this.isHorizontal()?"translateX(":"translateY(")+(!this.isHorizontal()||e?o*n:-o*n)+"px)";if(this.scrollOffset=t,this.offsetter.style.webkitTransform=i,this.offsetter.style.transform=i,this.bindTopIndex){var r=Math.floor(t/n);r!==this.topIndex&&r<this.repeater.getItemCount()&&(this.topIndex=r,this.bindTopIndex.assign(this.$scope,r),this.$rootScope.$$phase||this.$scope.$digest())}this.repeater.containerUpdated()}}},i.prototype.link_=function(e,t,n,o,i){this.container=e,this.transclude=t,this.repeatName=n,this.rawRepeatListExpression=o,this.extraName=i,this.sized=!1,this.repeatListExpression=de.bind(this,this.repeatListExpression_),this.container.register(this)},i.prototype.cleanupBlocks_=function(){de.forEach(this.pooledBlocks,function(e){e.element.remove()})},i.prototype.readItemSize_=function(){if(!this.itemSize){this.items=this.repeatListExpression(this.$scope),this.parentNode=this.$element[0].parentNode;var e=this.getBlock_(0);e.element[0].parentNode||this.parentNode.appendChild(e.element[0]),this.itemSize=e.element[0][this.container.isHorizontal()?"offsetWidth":"offsetHeight"]||null,this.blocks[0]=e,this.poolBlock_(0),this.itemSize&&this.containerUpdated()}},i.prototype.repeatListExpression_=function(e){var t=this.rawRepeatListExpression(e);if(this.onDemand&&t){var n=new o(t);
vendor: 7,593 bytes, line 10510
10510return n.$$includeIndexes(this.newStartIndex,this.newVisibleEnd),n}return t},i.prototype.containerUpdated=function(){if(!this.itemSize)return this.unwatchItemSize_&&this.unwatchItemSize_!==de.noop&&this.unwatchItemSize_(),this.unwatchItemSize_=this.$scope.$watchCollection(this.repeatListExpression,de.bind(this,function(e){e&&e.length&&this.readItemSize_()})),void(this.$rootScope.$$phase||this.$scope.$digest());this.sized||(this.items=this.repeatListExpression(this.$scope)),this.sized||(this.unwatchItemSize_(),this.sized=!0,this.$scope.$watchCollection(this.repeatListExpression,de.bind(this,function(e,t){this.isVirtualRepeatUpdating_||this.virtualRepeatUpdate_(e,t)}))),this.updateIndexes_(),(this.newStartIndex!==this.startIndex||this.newEndIndex!==this.endIndex||this.container.getScrollOffset()>this.container.getScrollSize())&&(this.items instanceof o&&this.items.$$includeIndexes(this.newStartIndex,this.newEndIndex),this.virtualRepeatUpdate_(this.items,this.items))},i.prototype.getItemSize=function(){return this.itemSize},i.prototype.getItemCount=function(){return this.itemsLength},i.prototype.virtualRepeatUpdate_=function(e,t){this.isVirtualRepeatUpdating_=!0;var n=e&&e.length||0,o=!1;if(this.items&&n<this.items.length&&0!==this.container.getScrollOffset()){this.items=e;var i=this.container.getScrollOffset();this.container.resetScroll(),this.container.scrollTo(i)}n!==this.itemsLength&&(o=!0,this.itemsLength=n),((this.items=e)!==t||o)&&this.updateIndexes_(),this.parentNode=this.$element[0].parentNode,o&&this.container.setScrollSize(n*this.itemSize),Object.keys(this.blocks).forEach(function(e){var t=parseInt(e,10);(t<this.newStartIndex||t>=this.newEndIndex)&&this.poolBlock_(t)},this),this.$browser.$$checkUrlChange=de.noop;var r,a,d=[],s=[];for(r=this.newStartIndex;r<this.newEndIndex&&null==this.blocks[r];r++)a=this.getBlock_(r),this.updateBlock_(a,r),d.push(a);for(;null!=this.blocks[r];r++)this.updateBlock_(this.blocks[r],r);for(var l=r-1;r<this.newEndIndex;r++)a=this.getBlock_(r),this.updateBlock_(a,r),s.push(a);if(d.length&&this.parentNode.insertBefore(this.domFragmentFromBlocks_(d),this.$element[0].nextSibling),s.length&&this.parentNode.insertBefore(this.domFragmentFromBlocks_(s),this.blocks[l]&&this.blocks[l].element[0].nextSibling),this.$browser.$$checkUrlChange=this.browserCheckUrlChange,this.startIndex=this.newStartIndex,this.endIndex=this.newEndIndex,this.isFirstRender){this.isFirstRender=!1;var c=this.$attrs.mdStartIndex?this.$scope.$eval(this.$attrs.mdStartIndex):this.container.topIndex;this.$mdUtil.nextTick(function(){this.container.scrollToIndex(c)}.bind(this))}this.isVirtualRepeatUpdating_=!1},i.prototype.getBlock_=function(n){return this.pooledBlocks.length?this.pooledBlocks.pop():(this.transclude(de.bind(this,function(e,t){o={element:e,new:!0,scope:t},this.updateScope_(t,n),this.parentNode.appendChild(e[0])})),o);var o},i.prototype.updateBlock_=function(e,t){((this.blocks[t]=e).new||e.scope.$index!==t||e.scope[this.repeatName]!==this.items[t])&&(e.new=!1,this.updateScope_(e.scope,t),this.$rootScope.$$phase||e.scope.$digest())},i.prototype.updateScope_=function(e,t){e.$index=t,e[this.repeatName]=this.items&&this.items[t],this.extraName&&(e[this.extraName(this.$scope)]=this.items[t])},i.prototype.poolBlock_=function(e){this.pooledBlocks.push(this.blocks[e]),this.parentNode.removeChild(this.blocks[e].element[0]),delete this.blocks[e]},i.prototype.domFragmentFromBlocks_=function(e){var t=this.$document[0].createDocumentFragment();return e.forEach(function(e){t.appendChild(e.element[0])}),t},i.prototype.updateIndexes_=function(){var e=this.items?this.items.length:0,t=Math.ceil(this.container.getSize()/this.itemSize);this.newStartIndex=Math.max(0,Math.min(e-t,Math.floor(this.container.getScrollOffset()/this.itemSize))),this.newVisibleEnd=this.newStartIndex+t+3,this.newEndIndex=Math.min(e,this.newVisibleEnd),this.newStartIndex=Math.max(0,this.newStartIndex-3)},o.prototype.$$includeIndexes=function(e,t){for(var n=e;n<t;n++)this.hasOwnProperty(n)||(this[n]=this.model.getItemAtIndex(n));this.length=this.model.getLength()},r.$inject=["$mdUtil"]}(),function(){function e(r){return{link:function(e,n,o){var i="";o.$observe("mdWhiteframe",function(e){-1!=(e=parseInt(e,10)||4)&&(24<e||e<1)&&(r.warn("md-whiteframe attribute value is invalid. It should be a number between 1 and 24",n[0]),e=4);var t=-1==e?"":"md-whiteframe-"+e+"dp";o.$updateClass(t,i),i=t})}}}e.$inject=["$log"],de.module("material.components.whiteframe",["material.core"]).directive("mdWhiteframe",e)}(),function(){e.$inject=["$scope","$element","$mdUtil","$mdConstant","$mdTheming","$window","$animate","$rootElement","$attrs","$q","$log","$mdLiveAnnouncer"],de.module("material.components.autocomplete").controller("MdAutocompleteCtrl",e);var oe=48,ie=5,re=8,ae=2;function e(u,p,h,t,n,e,o,i,f,d,r,a){var s,l,c,m=this,g=u.itemsExpr.split(/ in /i),b=g[1],v=null,E={},$=!1,y=[],C=!1,M=0,T=null,A=null,w=h.debounce(function(){m.hidden||N()});s="hidden",l=function(e,t){!e&&t?(N(),X(!0,k.Count|k.Selected),v&&(h.disableScrollAround(v.ul),T=function(e){function t(e){e.preventDefault()}return e.on("wheel",t),e.on("touchmove",t),function(){e.off("wheel",t),e.off("touchmove",t)}}(de.element(v.wrap)))):e&&!t&&(h.enableScrolling(),T&&(T(),T=null))},c=!0,Object.defineProperty(m,s,{get:function(){return c},set:function(e){var t=c;l(c=e,t)}}),m.scope=u,m.parent=u.$parent,m.itemName=g[0],m.matches=[],m.loading=!1,m.hidden=!0,m.index=null,m.id=h.nextUid(),m.isDisabled=null,m.isRequired=null,m.isReadonly=null,m.hasNotFound=!1,m.selectedMessage=u.selectedMessage||"selected",m.keydown=function(e){switch(e.keyCode){case t.KEY_CODE.DOWN_ARROW:if(m.loading||z())return;e.stopPropagation(),e.preventDefault(),m.index=Math.min(m.index+1,m.matches.length-1),Q(),X(!1,k.Selected);break;case t.KEY_CODE.UP_ARROW:if(m.loading||z())return;e.stopPropagation(),e.preventDefault(),m.index=m.index<0?m.matches.length-1:Math.max(0,m.index-1),Q(),X(!1,k.Selected);break;case t.KEY_CODE.TAB:if(I(),m.hidden||m.loading||m.index<0||m.matches.length<1)return;Y(m.index);break;case t.KEY_CODE.ENTER:if(m.hidden||m.loading||m.index<0||m.matches.length<1)return;if(z())return;e.stopPropagation(),e.preventDefault(),Y(m.index);break;case t.KEY_CODE.ESCAPE:if(e.preventDefault(),!(U("blur")||!m.hidden||m.loading||U("clear")&&u.searchText))return;e.stopPropagation(),K(),u.searchText&&U("clear")&&G(),m.hidden=!0,U("blur")&&function(e){e&&(C=$=!1);v.input.blur()}(!0)}},m.blur=function(e){C=!1,$||(m.hidden=B(),ne("ngBlur",{$event:e}))},m.focus=function(e){C=!0,j()&&V()&&ee();m.hidden=B(),ne("ngFocus",{$event:e})},m.clear=function(){K(),G()},m.select=Y,m.listEnter=function(){$=!0},m.listLeave=I,m.mouseUp=function(){v.input.focus()},m.getCurrentDisplayValue=W,m.registerSelectedItemWatcher=function(e){-1===y.indexOf(e)&&y.push(e)},m.unregisterSelectedItemWatcher=function(e){var t=y.indexOf(e);-1!==t&&y.splice(t,1)},m.notFoundVisible=J,m.loadingIsVisible=function(){return m.loading&&!z()},m.positionDropdown=N;var _,k={Count:1,Selected:2};return h.initOptionalProperties(u,f,{searchText:"",selectedItem:null,clearButton:!1}),n(p),_=parseInt(u.delay,10)||0,f.$observe("disabled",function(e){m.isDisabled=h.parseAttributeBoolean(e,!1)}),f.$observe("required",function(e){m.isRequired=h.parseAttributeBoolean(e,!1)}),f.$observe("readonly",function(e){m.isReadonly=h.parseAttributeBoolean(e,!1)}),u.$watch("searchText",_?h.debounce(O,_):O),u.$watch("selectedItem",H),de.element(e).on("resize",w),u.$on("$destroy",D),void h.nextTick(function(){var e;e=function(){var e,t;for(e=p;
10510e.length&&(t=e.attr("md-autocomplete-snap"),!de.isDefined(t));e=e.parent());if(e.length)return{snap:e[0],wrap:"width"===t.toLowerCase()?e[0]:p.find("md-autocomplete-wrap")[0]};var n=p.find("md-autocomplete-wrap")[0];return{snap:n,wrap:n}}(),(v={main:p[0],scrollContainer:p[0].querySelector(".md-virtual-repeat-container"),scroller:p[0].querySelector(".md-virtual-repeat-scroller"),ul:p.find("ul")[0],input:p.find("input")[0],wrap:e.wrap,snap:e.snap,root:document.body}).li=v.ul.getElementsByTagName("li"),v.$=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=de.element(e[n]));return t}(v),A=v.$.input.controller("ngModel"),v.$.root.length&&(n(v.$.scrollContainer),v.$.scrollContainer.detach(),v.$.root.append(v.$.scrollContainer),o.pin&&o.pin(v.$.scrollContainer,i)),u.autofocus&&p.on("focus",S),u.inputAriaDescribedBy&&v.input.setAttribute("aria-describedby",u.inputAriaDescribedBy),u.floatingLabel||(u.inputAriaLabel?v.input.setAttribute("aria-label",u.inputAriaLabel):u.inputAriaLabelledBy?v.input.setAttribute("aria-labelledby",u.inputAriaLabelledBy):u.placeholder&&v.input.setAttribute("aria-label",u.placeholder))});function x(){u.requireMatch&&A&&A.$setValidity("md-require-match",!!u.selectedItem||!u.searchText)}function N(){if(!v)return h.nextTick(N,!1,u);var e,t=(u.dropdownItems||ie)*oe,n=v.wrap.getBoundingClientRect(),o=v.snap.getBoundingClientRect(),i=v.root.getBoundingClientRect(),r=o.bottom-i.top,a=i.bottom-o.top,d=n.left-i.left,s=n.width,l=function(){var e=0,t=p.find("md-input-container");if(t.length){var n=t.find("input");e=t.prop("offsetHeight"),e-=n.prop("offsetTop"),e-=n.prop("offsetHeight"),e+=t.prop("offsetTop")}return e}(),c=u.dropdownPosition;if(c||(c=a<r&&i.height-r-re<t?"top":"bottom"),f.mdFloatingLabel&&(d+=ae,s-=2*ae),e={left:d+"px",minWidth:s+"px",maxWidth:Math.max(n.right-i.left,i.right-n.left)-re+"px"},"top"===c)e.top="auto",e.bottom=a+"px",e.maxHeight=Math.min(t,n.top-i.top-re)+"px";else{var m=i.bottom-n.bottom-re+h.getViewportTop();e.top=r-l+"px",e.bottom="auto",e.maxHeight=Math.min(t,m)+"px"}v.$.scrollContainer.css(e),h.nextTick(function(){var e=v.scrollContainer.getBoundingClientRect(),t={};e.right>i.right-re&&(t.left=n.right-e.width+"px");v.$.scrollContainer.css(t)},!1)}function S(){v.input.focus()}function D(){if(m.hidden||h.enableScrolling(),de.element(e).off("resize",w),v){de.forEach(["ul","scroller","scrollContainer","input"],function(e){v.$[e].remove()})}}function I(){C||m.hidden||v.input.focus(),$=!1,m.hidden=B()}function H(o,i){x(),o?L(o).then(function(e){var t,n;u.searchText=e,t=o,n=i,y.forEach(function(e){e(t,n)})}):i&&u.searchText&&L(i).then(function(e){de.isString(u.searchText)&&e.toString().toLowerCase()===u.searchText.toLowerCase()&&(u.searchText="")}),o!==i&&de.isFunction(u.itemChange)&&u.itemChange(R(u.selectedItem))}function O(t,n){m.index=u.autoselect?0:-1,t!==n&&(x(),L(u.selectedItem).then(function(e){t!==e&&(u.selectedItem=null,t!==n&&de.isFunction(u.textChange)&&u.textChange(),V()?ee():(F(!(m.matches=[])),X(!0,k.Count)))}))}function P(){return de.isNumber(u.minLength)?u.minLength:1}function L(e){return d.when((t=e,(t&&u.itemText?u.itemText(R(t)):null)||e)).then(function(e){return e&&!de.isString(e)&&r.warn("md-autocomplete: Could not resolve display value to a string. Please check the `md-item-text` attribute."),e});var t}function R(e){if(!e)return se;var t={};return m.itemName&&(t[m.itemName]=e),t}function F(e){m.loading!==e&&(m.loading=e),m.hidden=B()}function B(){return!function(){{if(m.isReadonly)return!1;if(!j())return!1}return V()&&q()||J()}()}function j(){return!(m.loading&&!q())&&(!z()&&!!C)}function U(e){return!u.escapeOptions||-1!==u.escapeOptions.toLowerCase().indexOf(e)}function q(){return!!m.matches.length}function z(){return!!m.scope.selectedItem}function W(){return L(m.matches[m.index])}function V(){return(u.searchText||"").length>=P()}function Y(e){h.nextTick(function(){L(m.matches[e]).then(function(e){var t=v.$.input.controller("ngModel");a.announce(e+" "+m.selectedMessage,"assertive"),t.$setViewValue(e),t.$render()}).finally(function(){u.selectedItem=m.matches[e],F(!1)})},!1)}function K(){m.index=0,m.matches=[]}function G(){F(!0),u.searchText="";var e=document.createEvent("CustomEvent");e.initCustomEvent("change",!0,!0,{value:""}),v.input.dispatchEvent(e),v.input.blur(),u.searchText="",v.input.focus()}function X(e,t){var n=e?"polite":"assertive",o=[];t&k.Selected&&-1!==m.index&&o.push(W()),t&k.Count&&o.push(d.resolve(function(){switch(m.matches.length){case 0:return"There are no matches available.";case 1:return"There is 1 match available.";default:return"There are "+m.matches.length+" matches available."}}())),d.all(o).then(function(e){a.announce(e.join(" "),n)})}function Q(){if(v.li[0]){var e=v.li[0].offsetHeight,t=e*m.index,n=t+e,o=v.scroller.clientHeight,i=v.scroller.scrollTop;t<i?Z(t):i+o<n&&Z(n-o)}}
vendor: 6,297 bytes, line 10510
10510function Z(e){v.$.scrollContainer.controller("mdVirtualRepeatContainer").scrollTo(e)}function J(){var e=(m.scope.searchText||"").length;return m.hasNotFound&&!q()&&(!m.loading||0!==M)&&e>=P()&&(C||$)&&!z()}function ee(){var e=u.searchText||"",t=e.toLowerCase();!u.noCache&&E[t]?te(E[t]):function(t){var e=u.$parent.$eval(b),n=t.toLowerCase(),o=de.isArray(e),i=!!e.then;function r(e){E[n]=e,(t||"")===(u.searchText||"")&&te(e)}o?r(e):i&&(a=e,a&&(a=d.when(a),M++,F(!0),h.nextTick(function(){a.then(r).finally(function(){0==--M&&F(!1)})},!0,u)));var a}(e),m.hidden=B()}function te(e){var n,t,o;m.matches=e,m.hidden=B(),m.loading&&F(!1),u.selectOnMatch&&(n=u.searchText,t=m.matches,o=t[0],1===t.length&&L(o).then(function(e){var t=n===e;u.matchInsensitive&&!t&&(t=n.toLowerCase()===e.toLowerCase()),t&&Y(0)})),N(),X(!0,k.Count)}function ne(e,t){f[e]&&u.$parent.$eval(f[e],t||{})}}}(),function(){function e(l){return{controller:"MdAutocompleteCtrl",controllerAs:"$mdAutocompleteCtrl",scope:{inputName:"@mdInputName",inputMinlength:"@mdInputMinlength",inputMaxlength:"@mdInputMaxlength",searchText:"=?mdSearchText",selectedItem:"=?mdSelectedItem",itemsExpr:"@mdItems",itemText:"&mdItemText",placeholder:"@placeholder",inputAriaDescribedBy:"@?inputAriaDescribedby",inputAriaLabelledBy:"@?inputAriaLabelledby",inputAriaLabel:"@?inputAriaLabel",noCache:"=?mdNoCache",requireMatch:"=?mdRequireMatch",selectOnMatch:"=?mdSelectOnMatch",matchInsensitive:"=?mdMatchCaseInsensitive",itemChange:"&?mdSelectedItemChange",textChange:"&?mdSearchTextChange",minLength:"=?mdMinLength",delay:"=?mdDelay",autofocus:"=?mdAutofocus",floatingLabel:"@?mdFloatingLabel",autoselect:"=?mdAutoselect",menuClass:"@?mdMenuClass",menuContainerClass:"@?mdMenuContainerClass",inputClass:"@?mdInputClass",inputId:"@?mdInputId",escapeOptions:"@?mdEscapeOptions",dropdownItems:"=?mdDropdownItems",dropdownPosition:"@?mdDropdownPosition",clearButton:"=?mdClearButton",selectedMessage:"@?mdSelectedMessage"},compile:function(e,n){var o=e.find("input");return["md-select-on-focus","md-no-asterisk","ng-trim","ng-pattern"].forEach(function(e){var t=n[n.$normalize(e)];null!==t&&o.attr(e,t)}),function(e,t,n,o){o.hasNotFound=!!t.attr("md-has-not-found"),de.isDefined(n.mdClearButton)||e.floatingLabel||(e.clearButton=!0)}},template:function(n,e){var t,o,i=(t=n.find("md-not-found").detach(),(o=t.length?t.html():"")?'<li ng-if="$mdAutocompleteCtrl.notFoundVisible()" md-autocomplete-parent-scope>'+o+"</li>":""),r=function(){var e=n.find("md-item-template").detach(),t=e.length?e.html():n.html();e.length||n.empty();return"<md-autocomplete-parent-scope md-autocomplete-replace>"+t+"</md-autocomplete-parent-scope>"}(),a=n.html(),d=e.tabindex,s=e.mdMenuContainerClass?" "+e.mdMenuContainerClass:"";return i&&n.attr("md-has-not-found",!0),n.attr("tabindex","-1")," <md-autocomplete-wrap ng-class=\"{ 'md-whiteframe-z1': !floatingLabel, 'md-menu-showing': !$mdAutocompleteCtrl.hidden, 'md-show-clear-button': !!clearButton }\"> "+(e.mdFloatingLabel?' <md-input-container ng-if="floatingLabel"> <label>{{floatingLabel}}</label> <input type="search" '+(null!=d?'tabindex="'+d+'"':"")+' id="{{ inputId || \'fl-input-\' + $mdAutocompleteCtrl.id }}" name="{{inputName}}" ng-class="::inputClass" autocomplete="off" ng-required="$mdAutocompleteCtrl.isRequired" ng-readonly="$mdAutocompleteCtrl.isReadonly" ng-minlength="inputMinlength" ng-maxlength="inputMaxlength" ng-disabled="$mdAutocompleteCtrl.isDisabled" ng-model="$mdAutocompleteCtrl.scope.searchText" ng-model-options="{ allowInvalid: true }" ng-keydown="$mdAutocompleteCtrl.keydown($event)" ng-blur="$mdAutocompleteCtrl.blur($event)" ng-focus="$mdAutocompleteCtrl.focus($event)" aria-label="{{floatingLabel}}" aria-autocomplete="list" role="combobox" aria-haspopup="true" aria-expanded="{{!$mdAutocompleteCtrl.hidden}}" aria-owns="ul-{{$mdAutocompleteCtrl.id}}" ng-attr-aria-activedescendant="{{$mdAutocompleteCtrl.index >= 0 ? \'selected_option\' : undefined}}"> <div md-autocomplete-parent-scope md-autocomplete-replace>'+a+"</div> </md-input-container>":' <input type="search" '+(null!=d?'tabindex="'+d+'"':"")+' id="{{ inputId || \'input-\' + $mdAutocompleteCtrl.id }}" name="{{inputName}}" ng-class="::inputClass" ng-if="!floatingLabel" autocomplete="off" ng-required="$mdAutocompleteCtrl.isRequired" ng-disabled="$mdAutocompleteCtrl.isDisabled" ng-readonly="$mdAutocompleteCtrl.isReadonly" ng-minlength="inputMinlength" ng-maxlength="inputMaxlength" ng-model="$mdAutocompleteCtrl.scope.searchText" ng-keydown="$mdAutocompleteCtrl.keydown($event)" ng-blur="$mdAutocompleteCtrl.blur($event)" ng-focus="$mdAutocompleteCtrl.focus($event)" placeholder="{{placeholder}}" aria-label="{{placeholder}}" aria-autocomplete="list" role="combobox" aria-haspopup="true" aria-expanded="{{!$mdAutocompleteCtrl.hidden}}" aria-owns="ul-{{$mdAutocompleteCtrl.id}}" ng-attr-aria-activedescendant="{{$mdAutocompleteCtrl.index >= 0 ? \'selected_option\' : undefined}}">')+' <button type="button" aria-label="Clear Input" tabindex="-1" ng-if="clearButton && $mdAutocompleteCtrl.scope.searchText" ng-click="$mdAutocompleteCtrl.clear($event)"><md-icon md-svg-src="'+l.mdClose+'"></md-icon></button> <md-progress-linear class="'+(e.mdFloatingLabel?"md-inline":"")+'" ng-if="$mdAutocompleteCtrl.loadingIsVisible()" md-mode="indeterminate"></md-progress-linear> <md-virtual-repeat-container md-auto-shrink md-auto-shrink-m
10510in="1" ng-mouseenter="$mdAutocompleteCtrl.listEnter()" ng-mouseleave="$mdAutocompleteCtrl.listLeave()" ng-mouseup="$mdAutocompleteCtrl.mouseUp()" ng-hide="$mdAutocompleteCtrl.hidden" class="md-autocomplete-suggestions-container md-whiteframe-z1'+s+'" ng-class="{ \'md-not-found\': $mdAutocompleteCtrl.notFoundVisible() }" role="presentation"> <ul class="md-autocomplete-suggestions" ng-class="::menuClass" id="ul-{{$mdAutocompleteCtrl.id}}" role="listbox"> <li md-virtual-repeat="item in $mdAutocompleteCtrl.matches" ng-class="{ selected: $index === $mdAutocompleteCtrl.index }" ng-attr-id="{{$index === $mdAutocompleteCtrl.index ? \'selected_option\' : undefined}}" ng-click="$mdAutocompleteCtrl.select($index)" role="option" aria-setsize="{{$mdAutocompleteCtrl.matches.length}}" aria-posinset="{{$index+1}}" aria-selected="{{$index === $mdAutocompleteCtrl.index ? true : false}}" md-extra-name="$mdAutocompleteCtrl.itemName"> '+r+" </li>"+i+" </ul> </md-virtual-repeat-container> </md-autocomplete-wrap>"}}}e.$inject=["$$mdSvgRegistry"],de.module("material.components.autocomplete").directive("mdAutocomplete",e)}(),function(){function e(e,c){return{restrict:"AE",compile:function(e,t,l){return function(n,t,e){var o,i,r=n.$mdAutocompleteCtrl,a=r.parent.$new(),d=r.itemName;function s(e,t){a[t]=n[e],n.$watch(e,function(e){c.nextTick(function(){a[t]=e})})}s("$index","$index"),s("item",d),i=o=!1,n.$watch(function(){i||o||(o=!0,n.$$postDigest(function(){i||a.$digest(),o=i=!1}))}),a.$watch(function(){i=!0}),l(a,function(e){t.after(e)})}},terminal:!0,transclude:"element"}}e.$inject=["$compile","$mdUtil"],de.module("material.components.autocomplete").directive("mdAutocompleteParentScope",e)}(),function(){function e(e,t,n){this.$scope=e,this.$element=t,this.$attrs=n,this.regex=null}e.$inject=["$scope","$element","$attrs"],de.module("material.components.autocomplete").controller("MdHighlightCtrl",e),e.prototype.init=function(t,n){this.flags=this.$attrs.mdHighlightFlags||"",this.unregisterFn=this.$scope.$watch(function(e){return{term:t(e),contentText:n(e)}}.bind(this),this.onRender.bind(this),!0),this.$element.on("$destroy",this.unregisterFn)},e.prototype.onRender=function(e,t){var n=e.contentText;null!==this.regex&&e.term===t.term||(this.regex=this.createRegex(e.term,this.flags)),e.term?this.applyRegex(n):this.$element.text(n)},e.prototype.applyRegex=function(e){var t=this.resolveTokens(e);this.$element.empty(),t.forEach(function(e){if(e.isMatch){var t=de.element('<span class="highlight">').text(e.text);this.$element.append(t)}else this.$element.append(document.createTextNode(e))}.bind(this))},e.prototype.resolveTokens=function(o){var i=[],n=0;return o.replace(this.regex,function(e,t){r(n,t),i.push({text:e,isMatch:!0}),n=t+e.length}),r(n),i;function r(e,t){var n=o.slice(e,t);n&&i.push(n)}},e.prototype.createRegex=function(e,t){var n="",o="",i=this.sanitizeRegex(e);return 0<=t.indexOf("^")&&(n="^"),0<=t.indexOf("$")&&(o="$"),new RegExp(n+i+o,t.replace(/[$^]/g,""))},e.prototype.sanitizeRegex=function(e){return e&&e.toString().replace(/[\\^$*+?.()|{}[\]]/g,"\\$&")}}(),function(){function e(n,o){return{terminal:!0,controller:"MdHighlightCtrl",compile:function(e,t){var i=o(t.mdHighlightText),r=n(e.html());return function(e,t,n,o){o.init(i,r)}}}}e.$inject=["$interpolate","$parse"],de.module("material.components.autocomplete").directive("mdHighlightText",e)}(),function(){function e(e,t,n,o,i){this.$scope=e,this.$element=t,this.$mdConstant=n,this.$timeout=o,this.$mdUtil=i,this.isEditing=!1,this.parentController=se,this.enableChipEdit=!1}e.$inject=["$scope","$element","$mdConstant","$timeout","$mdUtil"],de.module("material.components.chips").controller("MdChipCtrl",e),e.prototype.init=function(e){this.parentController=e,this.enableChipEdit=this.parentController.enableChipEdit,this.enableChipEdit&&(this.$element.on("key
10510down",this.chipKeyDown.bind(this)),this.$element.on("dblclick",this.chipMouseDoubleClick.bind(this)),this.getChipContent().addClass("_md-chip-content-edit-is-enabled"))},e.prototype.getChipContent=function(){var e=this.$element[0].getElementsByClassName("md-chip-content");return de.element(e[0])},e.prototype.getContentElement=function(){var e=de.element(this.getChipContent().children()[0]);return e&&0!==e.length||(e=de.element(this.getChipContent().contents()[0])),e},e.prototype.getChipIndex=function(){return parseInt(this.$element.attr("index"))},e.prototype.goOutOfEditMode=function(){if(this.isEditing){this.isEditing=!1,this.$element.removeClass("_md-chip-editing"),this.getChipContent()[0].contentEditable="false";var e=this.getChipIndex(),t=this.getContentElement().text();t?(this.parentController.updateChipContents(e,t),this.$mdUtil.nextTick(function(){this.parentController.selectedChip===e&&this.parentController.focusChip(e)}.bind(this))):this.parentController.removeChipAndFocusInput(e)}},e.prototype.selectNodeContents=function(e){var t,n;document.body.createTextRange?((t=document.body.createTextRange()).moveToElementText(e),t.select()):B.getSelection&&(n=B.getSelection(),(t=document.createRange()).selectNodeContents(e),n.removeAllRanges(),n.addRange(t))},e.prototype.goInEditMode=function(){this.isEditing=!0,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])},e.prototype.chipKeyDown=function(e){this.isEditing||e.keyCode!==this.$mdConstant.KEY_CODE.ENTER&&e.keyCode!==this.$mdConstant.KEY_CODE.SPACE?this.isEditing&&e.keyCode===this.$mdConstant.KEY_CODE.ENTER&&(e.preventDefault(),this.goOutOfEditMode()):(e.preventDefault(),this.goInEditMode())},e.prototype.chipMouseDoubleClick=function(){this.enableChipEdit&&!this.isEditing&&this.goInEditMode()}}(),function(){function e(d,e,t,s){return{restrict:"E",require:["^?mdChips","mdChip"],link:function(e,t,n,o){var i=o.shift(),r=o.shift(),a=de.element(t[0].querySelector(".md-chip-content"));d(t),i&&(r.init(i),a.on("blur",function(){i.resetSelectedChip(),i.$scope.$applyAsync()}));s(function(){i&&i.shouldFocusLastChip&&i.focusLastChipThenInput()})},controller:"MdChipCtrl"}}e.$inject=["$mdTheming","$mdUtil","$compile","$timeout"],de.module("material.components.chips").directive("mdChip",e)}(),function(){function e(i){return{restrict:"A",require:"^mdChips",scope:!1,link:function(t,e,n,o){e.on("click",function(e){t.$apply(function(){o.removeChip(t.$$replacedScope.$index)})}),i(function(){e.attr({tabindex:"-1","aria-hidden":"true"}),e.find("button").attr("tabindex","-1")})}}}e.$inject=["$timeout"],de.module("material.components.chips").directive("mdChipRemove",e)}(),function(){function e(a){return{restrict:"EA",terminal:!0,link:function(e,t,n){var o=e.$parent.$mdChipsCtrl,i=o.parent.$new(!1,o.parent);i.$$replacedScope=e,i.$chip=e.$chip,i.$index=e.$index;var r=(i.$mdChipsCtrl=o).$scope.$eval(n.mdChipTransclude);t.html(r),a(t.contents())(i)},scope:!1}}e.$inject=["$compile"],de.module("material.components.chips").directive("mdChipTransclude",e)}(),function(){e.$inject=["$scope","$attrs","$mdConstant","$log","$element","$timeout","$mdUtil","$mdLiveAnnouncer","$exceptionHandler"];var l=300;function e(e,t,n,o,i,r,a,d,s){this.$timeout=r,this.$mdConstant=n,this.$scope=e,this.parent=e.$parent,this.$mdUtil=a,this.$log=o,this.$mdLiveAnnouncer=d,this.$exceptionHandler=s,this.$element=i,this.$attrs=t,this.ngModelCtrl=null,this.userInputNgModelCtrl=null,this.autocompleteCtrl=null,this.userInputElement=null,this.items=[],this.selectedChip=-1,this.enableChipEdit=a.parseAttributeBoolean(t.mdEnableChipEdit),this.addOnBlur=a.parseAttributeBoolean(t.mdAddOnBlur),this.inputAriaLabel="Chips input.",this.containerHint="Chips container. Use arrow keys to select chips.",this.containerEmptyHint="Chips container. Enter the text area, then type text, and press enter to add a chip.",this.deleteHint="Press delete to remove this chip.",this.deleteButtonLabel="Remove",this.chipBuffer="",this.useTransformChip=!1,this.useOnAdd=!1,this.useOnRemove=!1,this.wrapperId="",this.contentIds=[],this.ariaTabIndex=null,this.chipAppendDelay=l,this.deRegister=[],this.addedMessage="added",this.removedMessage="removed",this.init()}de.module("material.components.chips").controller("MdChipsCtrl",e),e.prototype.init=function(){var t=this;this.wrapperId="_md-chips-wrapper-"+this.$mdUtil.nextUid(),this.$element.attr("ng-model")||this.setupStaticChips(),this.deRegister.push(this.$scope.$watchCollection("$mdChipsCtrl.items",function(){t.setupInputAria(),t.setupWrapperAria()})),this.deRegister.push(this.$attrs.$observe("mdChipAppendDelay",function(e){t.chipAppendDelay=parseInt(e)||l}))},e.prototype.$onDestroy=function(){for(var e;e=this.deRegister.pop();)e.call(this)},e.prototype.setupInputAria=function(){var e=this.$element.find("input");e&&(e.attr("role","textbox"),e.attr("aria-multiline",!0),this.inputAriaDescribedBy&&e.attr("aria-describedby",this.inputAriaDescribedBy),this.inputAriaLabelledBy?(e.attr("aria-labelledby",this.inputAriaLabelledBy),e.removeAttr("aria-label")):e.attr("aria-label",this.inputAriaLabel))},e.prototype.setupWrapperAria=function(){var e=this,t=this.$element.find("md-chips-wrap");this.items&&this.items.length?(t.attr("role","listbox"),this.contentIds=this.items.map(function(){return e.wrapperId+"-chip-"+e.$mdUtil.nextUid()}),t.attr("aria-owns",this.contentIds.join(" ")),t.attr("aria-label",this.containerHint)):(t.removeAttr("role"),t.removeAttr("aria-owns"),t.attr("aria-label",this.containerEmptyHint))},e.prototype.setupStaticChips=function(){var e,t,n=this,o=this.$element.find("md-chips-wrap");this.$timeout(function(){for(o.attr("role","list"),t=o[0].children,e=0;e<t.length;e++)t[e].setAttribute("role","listitem"),t[e].setAttribute("aria-setsize",t.length);n.inputAriaDescribedBy&&o.attr("aria-describedby",n.inputAriaDescribedBy),n.inputAriaLabelledBy?(o.attr("aria-labelledby",n.inputAriaLabelledBy),o.removeAttr("aria-label")):o.attr("aria-label",n.inputAriaLabel)},10)},e.prototype.inputKeydown=function(e){var t=this.getChipBuffer();
vendor: 16,727 bytes, line 10510
10510if(!(this.autocompleteCtrl&&e.isDefaultPrevented&&e.isDefaultPrevented())){if(e.keyCode===this.$mdConstant.KEY_CODE.BACKSPACE){if(0!==this.getCursorPosition(e.target))return;return e.preventDefault(),e.stopPropagation(),void(this.items.length&&this.selectAndFocusChipSafe(this.items.length-1))}if((!this.separatorKeys||this.separatorKeys.length<1)&&(this.separatorKeys=[this.$mdConstant.KEY_CODE.ENTER]),-1!==this.separatorKeys.indexOf(e.keyCode)){if(this.autocompleteCtrl&&this.requireMatch||!t)return;if(e.preventDefault(),this.hasMaxChipsReached())return;return this.appendChip(t.trim()),this.resetChipBuffer(),!1}}},e.prototype.getCursorPosition=function(t){try{if(t.selectionStart===t.selectionEnd)return t.selectionStart}catch(e){if(!t.value)return 0}},e.prototype.updateChipContents=function(e,t){0<=e&&e<this.items.length&&(this.items[e]=t,this.updateNgModel(!0))},e.prototype.isEditingChip=function(){return!!this.$element[0].querySelector("._md-chip-editing")},e.prototype._isChipObject=function(e){return de.isObject(e)},e.prototype.isRemovable=function(){return!!this.ngModelCtrl&&(this.readonly?this.removable:!de.isDefined(this.removable)||this.removable)},e.prototype.chipKeydown=function(e){if(!this.getChipBuffer()&&!this.isEditingChip())switch(e.keyCode){case this.$mdConstant.KEY_CODE.BACKSPACE:case this.$mdConstant.KEY_CODE.DELETE:if(this.selectedChip<0)return;if(e.preventDefault(),!this.isRemovable())return;this.removeAndSelectAdjacentChip(this.selectedChip,e);break;case this.$mdConstant.KEY_CODE.LEFT_ARROW:e.preventDefault(),(this.selectedChip<0||this.readonly&&0===this.selectedChip)&&(this.selectedChip=this.items.length),this.items.length&&this.selectAndFocusChipSafe(this.selectedChip-1);break;case this.$mdConstant.KEY_CODE.RIGHT_ARROW:e.preventDefault(),this.selectAndFocusChipSafe(this.selectedChip+1);break;case this.$mdConstant.KEY_CODE.ESCAPE:case this.$mdConstant.KEY_CODE.TAB:if(this.selectedChip<0)return;e.preventDefault(),this.onFocus()}},e.prototype.getPlaceholder=function(){return this.items&&this.items.length&&(""===this.secondaryPlaceholder||this.secondaryPlaceholder)?this.secondaryPlaceholder:this.placeholder},e.prototype.removeAndSelectAdjacentChip=function(e,t){var n=this,o=n.getAdjacentChipIndex(e);this.$element[0].querySelector("md-chips-wrap"),this.$element[0].querySelector('md-chip[index="'+e+'"]');n.removeChip(e,t),n.$timeout(function(){n.$timeout(function(){n.selectAndFocusChipSafe(o)})})},e.prototype.resetSelectedChip=function(){this.selectedChip=-1,this.ariaTabIndex=null},e.prototype.getAdjacentChipIndex=function(e){var t=this.items.length-1;return 0===t?-1:e===t?e-1:e},e.prototype.appendChip=function(t){if(this.shouldFocusLastChip=!this.addOnBlur,this.useTransformChip&&this.transformChip){var e=this.transformChip({$chip:t});de.isDefined(e)&&(t=e)}if(de.isObject(t)&&this.items.some(function(e){return de.equals(t,e)}))return;if(!(null==t||this.items.indexOf(t)+1)){var n=this.items.push(t)-1;this.updateNgModel();var o=de.isObject(t)?"":t;this.$mdLiveAnnouncer.announce(o+" "+this.addedMessage,"assertive"),this.useOnAdd&&this.onAdd&&this.onAdd({$chip:t,$index:n})}},e.prototype.useTransformChipExpression=function(){this.useTransformChip=!0},e.prototype.useOnAddExpression=function(){this.useOnAdd=!0},e.prototype.useOnRemoveExpression=function(){this.useOnRemove=!0},e.prototype.useOnSelectExpression=function(){this.useOnSelect=!0},e.prototype.getChipBuffer=function(){var e=this.userInputElement?this.userInputNgModelCtrl?this.userInputNgModelCtrl.$viewValue:this.userInputElement[0].value:this.chipBuffer;return de.isString(e)?e:""},e.prototype.resetChipBuffer=function(){this.userInputElement?this.userInputNgModelCtrl?(this.userInputNgModelCtrl.$setViewValue(""),this.userInputNgModelCtrl.$render()):this.userInputElement[0].value="":this.chipBuffer=""},e.prototype.hasMaxChipsReached=function(){return de.isString(this.maxChips)&&(this.maxChips=parseInt(this.maxChips,10)||0),0<this.maxChips&&this.items.length>=this.maxChips},e.prototype.validateModel=function(){this.ngModelCtrl.$setValidity("md-max-chips",!this.hasMaxChipsReached()),this.ngModelCtrl.$validate()},e.prototype.updateNgModel=function(e){e||this.validateModel(),de.forEach(this.ngModelCtrl.$viewChangeListeners,function(e){try{e()}catch(e){this.$exceptionHandler(e)}})},e.prototype.removeChip=function(e,t){var n=this.items.splice(e,1);this.updateNgModel(),this.ngModelCtrl.$setDirty();var o=de.isObject(n[0])?"":n[0];this.$mdLiveAnnouncer.announce(o+" "+this.removedMessage,"assertive"),n&&n.length&&this.useOnRemove&&this.onRemove&&this.onRemove({$chip:n[0],$index:e,$event:t})},e.prototype.removeChipAndFocusInput=function(e,t){this.removeChip(e,t),this.autocompleteCtrl?(this.autocompleteCtrl.hidden=!0,this.$mdUtil.nextTick(this.onFocus.bind(this))):this.onFocus()},e.prototype.selectAndFocusChipSafe=function(e){if(!this.items.length||-1===e)return this.focusInput();if(e>=this.items.length){if(!this.readonly)return this.onFocus();e=0}e=Math.max(e,0),e=Math.min(e,this.items.length-1),this.selectChip(e),this.focusChip(e)},e.prototype.focusLastChipThenInput=function(){var e=this;e.shouldFocusLastChip=!1,e.focusChip(this.items.length-1),e.$timeout(function(){e.focusInput()},e.chipAppendDelay)},e.prototype.focusInput=function(){this.selectChip(-1),this.onFocus()},e.prototype.selectChip=function(e){-1<=e&&e<=this.items.length?(this.selectedChip=e,this.useOnSelect&&this.onSelect&&this.onSelect({$chip:this.items[e]})):this.$log.warn("Selected Chip index out of bounds; ignoring.")},e.prototype.selectAndFocusChip=function(e){this.selectChip(e),-1!==e&&this.focusChip(e)},e.prototype.focusChip=function(e){var t=this.$element[0].querySelector('md-chip[index="'+e+'"] .md-chip-content');this.ariaTabIndex=e,t.focus()},e.prototype.configureNgModel=function(e){this.ngModelCtrl=e;var t=this;e.$isEmpty=function(e){return!e||0===e.length},e.$render=function(){t.items=t.ngModelCtrl.$viewValue}},e.prototype.onFocus=function(){var e=this.$element[0].querySelector("input");e&&e.focus(),this.resetSelectedChip()},e.prototype.onInputFocus=function(){this.inputHasFocus=!0,this.setupInputAria(),this.resetSelectedChip()},e.prototype.onInputBlur=function(){this.inputHasFocus=!1,this.shouldAddOnBlur()&&(this.appendChip(this.getChipBuffer().trim()),this.resetChipBuffer())},e.prototype.configureInput=function(e){var t=e.controller("ngModel"),n=this;t&&(this.deRegister.push(this.$scope.$watch(function(){return t.$touched},function(e){e&&n.ngModelCtrl.$setTouched()})),this.deRegister.push(this.$scope.$watch(function(){return t.$dirty},function(e){e&&n.ngModelCtrl.$setDirty()})))},e.prototype.configureUserInput=function(e){var t=(this.userInputElement=e).controller("ngModel");t!==this.ngModelCtrl&&(this.userInputNgModelCtrl=t);var n=this.$scope,o=this,i=function(e,t){n.$evalAsync(de.bind(o,t,e))};e.attr({tabindex:0}).on("keydown",function(e){i(e,o.inputKeydown)}).on("focus",function(e){i(e,o.onInputFocus)}).on("blur",function(e){i(e,o.onInputBlur)})},e.prototype.configureAutocomplete=function(e){e&&(this.autocompleteCtrl=e,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()),e.registerSelectedItemWatcher(de.bind(this,function(e){if(e){if(this.hasMaxChipsReached())return;this.appendChip(e),this.resetChipBuffer()}})),this.$element.find("input").on("focus",de.bind(this,this.onInputFocus)).on("blur",de.bind(this,this.onInputBlur)))},e.prototype.shouldAddOnBlur=function(){this.validateModel();var e=this.getChipBuffer().trim(),t=this.ngModelCtrl.$isEmpty(this.ngModelCtrl.$modelValue)||this.ngModelCtrl.$valid,n=this.autocompleteCtrl&&!this.autocompleteCtrl.hidden;return this.userInputNgModelCtrl&&(t=t&&this.userInputNgModelCtrl.$valid),this.addOnBlur&&!this.requireMatch&&e&&t&&!n},e.prototype.hasFocus=function(){return this.inputHasFocus||0<=this.selectedChip},e.prototype.contentIdFor=function(e){return this.contentIds[e]}}(),function(){o.$inject=["$mdTheming","$mdUtil","$compile","$log","$timeout","$$mdSvgRegistry"],de.module("material.components.chips").directive("mdChips",o);var e=' <md-chips-wrap id="{{$mdChipsCtrl.wrapperId}}" tabindex="{{$mdChipsCtrl.readonly ? 0 : -1}}" ng-keydown="$mdChipsCtrl.chipKeydown($event)" ng-class="{ \'md-focused\': $mdChipsCtrl.hasFocus(), \'md-readonly\': !$mdChipsCtrl.ngModelCtrl || $mdChipsCtrl.readonly, \'md-removable\': $mdChipsCtrl.isRemovable() }" class="md-chips"> <md-chip ng-repeat="$chip in $mdChipsCtrl.items" index="{{$index}}" ng-class="{\'md-focused\': $mdChipsCtrl.selectedChip == $index, \'md-readonly\': !$mdChipsCtrl.ngModelCtrl || $mdChipsCtrl.readonly}"> <div class="md-chip-content" tabindex="{{$mdChipsCtrl.ariaTabIndex === $index ? 0 : -1}}" id="{{$mdChipsCtrl.contentIdFor($index)}}" role="option" aria-selected="{{$mdChipsCtrl.selectedChip === $index}}" aria-setsize="{{$mdChipsCtrl.items.length}}" aria-posinset="{{$index+1}}" ng-click="!$mdChipsCtrl.readonly && $mdChipsCtrl.focusChip($index)" aria-label="{{$mdChipsCtrl._isChipObject($chip) ? \'\' : $chip + \'. \'}}{{$mdChipsCtrl.isRemovable() ? \'\' + $mdChipsCtrl.deleteHint : \'\'}}" ng-focus="!$mdChipsCtrl.readonly && $mdChipsCtrl.selectChip($index)" md-chip-transclude="$mdChipsCtrl.chipContentsTemplate"></div> <div ng-if="$mdChipsCtrl.isRemovable()" class="md-chip-remove-container" tabindex="-1" md-chip-transclude="$mdChipsCtrl.chipRemoveTemplate"></div> </md-chip> <div class="md-chip-input-container" ng-if="!$mdChipsCtrl.readonly && $mdChipsCtrl.ngModelCtrl"> <div md-chip-transclude="$mdChipsCtrl.chipInputTemplate"></div> </div> </md-chips-wrap>',t=' <input class="md-input" tabindex="0" aria-label="{{$mdChipsCtrl.inputAriaLabel}}" placeholder="{{$mdChipsCtrl.getPlaceholder()}}" ng-model="$mdChipsCtrl.chipBuffer" ng-focus="$mdChipsCtrl.onInputFocus()" ng-blur="$mdChipsCtrl.onInputBlur()" ng-keydown="$mdChipsCtrl.inputKeydown($event)">',n=" <span>{{$chip}}</span>",i=' <button class="md-chip-remove" ng-if="$mdChipsCtrl.isRemovable()" ng-click="$mdChipsCtrl.removeChipAndFocusInput($$replacedScope.$index, $event)" type="button" tabindex="-1" aria-label="{{$mdChipsCtrl.deleteButtonLabel}}{{$mdChipsCtrl._isChipObject($chip) ? \'\' : \' \' + $chip}}"> <md-icon md-svg-src="{{$mdChipsCtrl.mdCloseIcon}}" aria-hidden="true"></md-icon> </button>';function o(u,p,h,o,f,g){var b={chips:p.processTemplate(e),input:p.processTemplate(t),default:p.processTemplate(n),remove:p.processTemplate(i)};return{template:function(e,t){return t.$mdUserTemplate=e.clone(),b.chips},require:["mdChips"],restrict:"E",controller:"MdChipsCtrl",controllerAs:"$mdChipsCtrl",bindToController:!0,compile:function(e,a){var n=a.$mdUserTemplate;a.$mdUserTemplate=null;var d=t("md-chips>md-chip-template"),s=t(p.prefixer().buildList("md-chip-remove").map(function(e){return"md-chips>*["+e+"]"}).join(","))||b.remove,l=d||b.default,c=t("md-chips>md-autocomplete")||t("md-chips>input")||b.input,m=n.find("md-chip");n[0].querySelector("md-chip-template>*[md-chip-remove]")&&o.warn("invalid placement of md-chip-remove within md-chip-template.");function t(e){if(a.ngModel){var t=n[0].querySelector(e);return t&&t.outerHTML}}return function(e,t,n,o){p.initOptionalProperties(e,a),u(t);var i=o[0];if(d&&(i.enableChipEdit=!1),i.chipContentsTemplate=l,i.chipRemoveTemplate=s,i.chipInputTemplate=c,i.mdCloseIcon=g.mdClose,t.attr({tabindex:-1}).on("focus",function(){i.onFocus()}).on("click",function(){i.readonly||-1!==i.selectedChip||i.onFocus()}),a.ngModel&&(i.configureNgModel(t.controller("ngModel")),n.mdTransformChip&&i.useTransformChipExpression(),n.mdOnAppend&&i.useOnAppendExpression(),n.mdOnAdd&&i.useOnAddExpression(),n.mdOnRemove&&i.useOnRemoveExpression(),n.mdOnSelect&&i.useOnSelectExpression(),c!==b.input&&e.$watch("$mdChipsCtrl.readonly",function(e){e||p.nextTick(function(){if(0===c.indexOf("<md-autocomplete")){var e=t.find("md-autocomplete");i.configureAutocomplete(e.controller("mdAutocomplete"))}i.configureUserInput(t.find("input"))})}),p.nextTick(function(){var e=t.find("input");e&&(i.configureInput(e),e.toggleClass("md-input",!0))})),0<m.length){var r=h(m.clone())(e.$parent);f(function(){t.find("md-chips-wrap").prepend(r)})}}},scope:{readonly:"=?readonly",removable:"=?mdRemovable",placeholder:"@?",secondaryPlaceholder:"@?",maxChips:"@?mdMaxChips",transformChip:"&mdTransformChip",onAppend:"&?mdOnAppend",onAdd:"&?mdOnAdd",onRemove:"&?mdOnRemove",addedMessage:"@?mdAddedMessage",removedMessage:"@?mdRemovedMessage",onSelect:"&?mdOnSelect",inputAriaDescribedBy:"@?inputAriaDescribedby",inputAriaLabelledBy:"@?inputAriaLabelledby",inputAriaLabel:"@?",containerHint:"@?",containerEmptyHint:"@?",deleteHint:"@?",deleteButtonLabel:"@?",separatorKeys:"=?mdSeparatorKeys",requireMatch:"=?mdRequireMatch",chipAppendDelayString:"@?mdChipAppendDelay",ngChange:"&?"}}}}(),function(){function e(e,t,n){this.$element=t,this.$attrs=e,this.$timeout=n,this.selectedItem=null,this.searchText="",this.deRegister=[],this.init()}e.$inject=["$attrs","$element","$timeout"],de.module("material.components.chips").controller("MdContactChipsCtrl",e),e.prototype.init=function(){var e=this,t=this.deRegister,n=this.$element;this.$timeout(function(){t.push(n.find("md-chips").scope().$watchCollection("$mdChipsCtrl.items",function(){e.setupChipsAria(),e.setupAutocompleteAria()}))})},e.prototype.setupChipsAria=function(){var e=this.$element.find("md-chips"),t=e.controller("mdChips");this.removedMessage&&(t.removedMessage=this.removedMessage),this.containerHint&&(t.containerHint=this.containerHint),this.containerEmptyHint&&(e.attr("container-empty-hint",this.containerEmptyHint),t.containerEmptyHint=this.containerEmptyHint),this.deleteHint&&(t.deleteHint=this.deleteHint),this.inputAriaLabel&&(t.inputAriaLabel=this.inputAriaLabel)},e.prototype.setupAutocompleteAria=function(){var e=this.$element.find("md-chips-wrap").find("md-autocomplete").find("input");this.inputAriaDescribedBy&&e.attr("aria-describedby",this.inputAriaDescribedBy),this.inputAriaLabelledBy&&(e.removeAttr("aria-label"),e.attr("aria-labelledby",this.inputAriaLabelledBy))},e.prototype.queryContact=function(e){return this.contactQuery({$query:e})},e.prototype.inputKeydown=function(e){if(this.separatorKeys&&!(this.separatorKeys.indexOf(e.keyCode)<0)){e.stopPropagation(),e.preventDefault();var t=de.element(e.target).controller("mdAutocomplete");t.select(t.index)}},e.prototype.itemName=function(e){return e[this.contactName]},e.prototype.$onDestroy=function(){for(var e;e=this.deRegister.pop();)e.call(this)}}(),function(){e.$inject=["$mdTheming","$mdUtil"],de.module("material.components.chips").directive("mdContactChips",e);var n=' <md-chips class="md-contact-chips" ng-model="$mdContactChipsCtrl.contacts" ng-change="$mdContactChipsCtrl.ngChange($mdContactChipsCtrl.contacts)" md-require-match="$mdContactChipsCtrl.requireMatch" md-chip-append-delay="{{$mdContactChipsCtrl.chipAppendDelay}}" md-separator-keys="$mdContactChipsCtrl.separatorKeys" md-autocomplete-snap> <md-autocomplete md-menu-class="md-contact-chips-suggestions" md-selected-item="$mdContactChipsCtrl.selectedItem" md-search-text="$mdContactChipsCtrl.searchText" md-items="item in $mdContactChipsCtrl.queryContact($mdContactChipsCtrl.searchText)" md-item-text="$mdContactChipsCtrl.itemName(item)" md-no-cache="true" md-min-length="$mdContactChipsCtrl.minLength" md-autoselect ng-keydown="$mdContactChipsCtrl.inputKeydown($event)" placeholder="{{$mdContactChipsCtrl.contacts.length === 0 ? $mdContactChipsCtrl.placeholder : $mdContactChipsCtrl.secondaryPlaceholder}}"> <div class="md-contact-suggestion"> <img ng-src="{{item[$mdContactChipsCtrl.contactImage]}}" alt="{{item[$mdContactChipsCtrl.contactName]}}" ng-if="item[$mdContactChipsCtrl.contactImage]" />
10510 <span class="md-contact-name" md-highlight-text="$mdContactChipsCtrl.searchText" md-highlight-flags="{{$mdContactChipsCtrl.highlightFlags}}"> {{item[$mdContactChipsCtrl.contactName]}} </span> <span class="md-contact-email" >{{item[$mdContactChipsCtrl.contactEmail]}}</span> </div> </md-autocomplete> <md-chip-template> <div class="md-contact-avatar"> <img ng-src="{{$chip[$mdContactChipsCtrl.contactImage]}}" alt="{{$chip[$mdContactChipsCtrl.contactName]}}" ng-if="$chip[$mdContactChipsCtrl.contactImage]" /> </div> <div class="md-contact-name"> {{$chip[$mdContactChipsCtrl.contactName]}} </div> </md-chip-template> </md-chips>';function e(a,d){return{template:function(e,t){return n},restrict:"E",controller:"MdContactChipsCtrl",controllerAs:"$mdContactChipsCtrl",bindToController:!0,compile:function(e,r){return function(e,t,n,o){var i=o;d.initOptionalProperties(e,r),a(t),t.attr("tabindex","-1"),n.$observe("mdChipAppendDelay",function(e){i.chipAppendDelay=e})}},scope:{contactQuery:"&mdContacts",placeholder:"@?",secondaryPlaceholder:"@?",contactName:"@mdContactName",contactImage:"@mdContactImage",contactEmail:"@mdContactEmail",contacts:"=ngModel",ngChange:"&?",requireMatch:"=?mdRequireMatch",minLength:"=?mdMinLength",highlightFlags:"@?mdHighlightFlags",chipAppendDelay:"@?mdChipAppendDelay",separatorKeys:"=?mdSeparatorKeys",removedMessage:"@?mdRemovedMessage",inputAriaDescribedBy:"@?inputAriaDescribedby",inputAriaLabelledBy:"@?inputAriaLabelledby",inputAriaLabel:"@?",containerHint:"@?",containerEmptyHint:"@?",deleteHint:"@?"}}}}(),function(){e.$inject=["$element","$scope","$$mdDateUtil","$mdUtil","$mdConstant","$mdTheming","$$rAF","$attrs","$mdDateLocale"],de.module("material.components.datepicker").directive("mdCalendar",function(){return{template:function(e,t){var n=t.hasOwnProperty("ngIf")?"":'ng-if="calendarCtrl.isInitialized"',o='<div ng-switch="calendarCtrl.currentView" '+n+'><md-calendar-year ng-switch-when="year"></md-calendar-year><md-calendar-month ng-switch-default></md-calendar-month></div>';return o},scope:{minDate:"=mdMinDate",maxDate:"=mdMaxDate",dateFilter:"=mdDateFilter",_mode:"@mdMode",_currentView:"@mdCurrentView"},require:["ngModel","mdCalendar"],controller:e,controllerAs:"calendarCtrl",bindToController:!0,link:function(e,t,n,o){var i=o[0],r=o[1];r.configureNgModel(i)}}});var m=0,t={day:"month",month:"year"};function e(e,t,n,o,i,r,a,d,s){r(e),this.$element=e,this.$scope=t,this.dateUtil=n,this.$mdUtil=o,this.keyCode=i.KEY_CODE,this.$$rAF=a,this.$mdDateLocale=s,this.today=this.dateUtil.createDateAtMidnight(),this.ngModelCtrl=null,this.SELECTED_DATE_CLASS="md-calendar-selected-date",this.TODAY_CLASS="md-calendar-date-today",this.FOCUSED_DATE_CLASS="md-focus",this.id=m++,this.displayDate=null,this.selectedDate=null,this.firstRenderableDate=null,this.lastRenderableDate=null,this.isInitialized=!1,this.width=0,this.scrollbarWidth=0,d.tabindex||e.attr("tabindex","-1");var l,c=de.bind(this,this.handleKeyEvent);(l=e.parent().hasClass("md-datepicker-calendar")?de.element(document.body):e).on("keydown",c),t.$on("$destroy",function(){l.off("keydown",c)}),1===de.version.major&&de.version.minor<=4&&this.$onInit()}e.prototype.$onInit=function(){this._mode&&t.hasOwnProperty(this._mode)?(this.currentView=t[this._mode],this.mode=this._mode):(this.currentView=this._currentView||"month",this.mode=null);var e=this.$mdDateLocale;this.minDate&&this.minDate>e.firstRenderableDate?this.firstRenderableDate=this.minDate:this.firstRenderableDate=e.firstRenderableDate,this.maxDate&&this.maxDate<e.lastRenderableDate?this.lastRenderableDate=this.maxDate:this.lastRenderableDate=e.lastRenderableDate},e.prototype.configureNgModel=function(e){var t=this;t.ngModelCtrl=e,t.$mdUtil.nextTick(function(){t.isInitialized=!0}),e.$render=function(){var e=this.$viewValue;t.$scope.$broadcast("md-calendar-parent-changed",e),t.selectedDate||(t.selectedDate=e),t.displayDate||(t.displayDate=t.selectedDate||t.today)}},e.prototype.setNgModelValue=function(e){var t=this.dateUtil.createDateAtMidnight(e);return this.focus(t),this.$scope.$emit("md-calendar-change",t),this.ngModelCtrl.$setViewValue(t),this.ngModelCtrl.$render(),t},e.prototype.setCurrentView=function(e,t){var n=this;n.$mdUtil.nextTick(function(){n.currentView=e,t&&(n.displayDate=de.isDate(t)?t:new Date(t))})}
vendor: 4,057 bytes, line 10510
10510,e.prototype.focus=function(e){if(this.dateUtil.isValidDate(e)){var t=this.$element[0].querySelector("."+this.FOCUSED_DATE_CLASS);t&&t.classList.remove(this.FOCUSED_DATE_CLASS);var n=this.getDateId(e,this.currentView),o=document.getElementById(n);o&&(o.classList.add(this.FOCUSED_DATE_CLASS),o.focus(),this.displayDate=e)}else{var i=this.$element[0].querySelector("[ng-switch]");i&&i.focus()}},e.prototype.changeSelectedDate=function(e){var t=this.SELECTED_DATE_CLASS,n=this.$element[0].querySelector("."+t);if(n&&(n.classList.remove(t),n.setAttribute("aria-selected","false")),e){var o=document.getElementById(this.getDateId(e,this.currentView));o&&(o.classList.add(t),o.setAttribute("aria-selected","true"))}this.selectedDate=e},e.prototype.getActionFromKeyEvent=function(e){var t=this.keyCode;switch(e.which){case t.ENTER:return"select";case t.RIGHT_ARROW:return"move-right";case t.LEFT_ARROW:return"move-left";case t.DOWN_ARROW:return e.metaKey?"move-page-down":"move-row-down";case t.UP_ARROW:return e.metaKey?"move-page-up":"move-row-up";case t.PAGE_DOWN:return"move-page-down";case t.PAGE_UP:return"move-page-up";case t.HOME:return"start";case t.END:return"end";default:return null}},e.prototype.handleKeyEvent=function(t){var n=this;this.$scope.$apply(function(){if(t.which==n.keyCode.ESCAPE||t.which==n.keyCode.TAB)return n.$scope.$emit("md-calendar-close"),void(t.which==n.keyCode.TAB&&t.preventDefault());var e=n.getActionFromKeyEvent(t);e&&(t.preventDefault(),t.stopPropagation(),n.$scope.$broadcast("md-calendar-parent-action",e))})},e.prototype.hideVerticalScrollbar=function(o){var i=this,t=o.$element[0],r=t.querySelector(".md-calendar-scroll-mask");function n(){var e=i.width||340,t=i.scrollbarWidth,n=o.calendarScroller;r.style.width=e+"px",n.style.width=e+t+"px",n.style.paddingRight=t+"px"}0<i.width?n():i.$$rAF(function(){var e=o.calendarScroller;i.scrollbarWidth=e.offsetWidth-e.clientWidth,i.width=t.querySelector("table").offsetWidth,n()})},e.prototype.getDateId=function(e,t){if(!t)throw new Error("A namespace for the date id has to be specified.");return["md",this.id,t,e.getFullYear(),e.getMonth(),e.getDate()].join("-")},e.prototype.updateVirtualRepeat=function(){var e=this.$scope,t=e.$on("$md-resize-enable",function(){e.$$phase||e.$apply(),t()})}}(),function(){t.$inject=["$element","$scope","$animate","$q","$$mdDateUtil","$mdDateLocale"],de.module("material.components.datepicker").directive("mdCalendarMonth",function(){return{template:'<table aria-hidden="true" class="md-calendar-day-header"><thead></thead></table><div class="md-calendar-scroll-mask"><md-virtual-repeat-container class="md-calendar-scroll-container" md-offset-size="'+(e-n)+'"><table role="grid" tabindex="0" class="md-calendar" aria-readonly="true"><tbody md-calendar-month-body role="rowgroup" md-virtual-repeat="i in monthCtrl.items" md-month-offset="$index" class="md-calendar-month" md-start-index="monthCtrl.getSelectedMonthIndex()" md-item-size="'+n+'"><tr aria-hidden="true" md-force-height="\''+n+"px'\"></tr></tbody></table></md-virtual-repeat-container></div>",require:["^^mdCalendar","mdCalendarMonth"],controller:t,controllerAs:"monthCtrl",bindToController:!0,link:function(e,t,n,o){var i=o[0],r=o[1];r.initialize(i)}}});var n=265,e=45;function t(e,t,n,o,i,r){this.$element=e,this.$scope=t,this.$animate=n,this.$q=o,this.dateUtil=i,this.dateLocale=r,this.calendarScroller=e[0].querySelector(".md-virtual-repeat-scroller"),this.isInitialized=!1,this.isMonthTransitionInProgress=!1;var a=this;this.cellClickHandler=function(){var e=i.getTimestampFromNode(this);a.$scope.$apply(function(){a.calendarCtrl.setNgModelValue(e)})},this.headerClickHandler=function(){a.calendarCtrl.setCurrentView("year",i.getTimestampFromNode(this))}}t.prototype.initialize=function(e){this.items={length:this.dateUtil.getMonthDistance(e.firstRenderableDate,e.lastRenderableDate)+2},this.calendarCtrl=e,this.attachScopeListeners(),e.updateVirtualRepeat(),e.ngModelCtrl&&e.ngModelCtrl.$render()},t.prototype.getSelectedMonthIndex=function(){var e=this.calendarCtrl;
vendor: 13,065 bytes, line 10510
10510return this.dateUtil.getMonthDistance(e.firstRenderableDate,e.displayDate||e.selectedDate||e.today)},t.prototype.changeDisplayDate=function(e){if(!this.isInitialized)return this.buildWeekHeader(),this.calendarCtrl.hideVerticalScrollbar(this),this.isInitialized=!0,this.$q.when();if(!this.dateUtil.isValidDate(e)||this.isMonthTransitionInProgress)return this.$q.when();this.isMonthTransitionInProgress=!0;var t=this.animateDateChange(e);this.calendarCtrl.displayDate=e;var n=this;return t.then(function(){n.isMonthTransitionInProgress=!1}),t},t.prototype.animateDateChange=function(e){if(this.dateUtil.isValidDate(e)){var t=this.dateUtil.getMonthDistance(this.calendarCtrl.firstRenderableDate,e);this.calendarScroller.scrollTop=t*n}return this.$q.when()},t.prototype.buildWeekHeader=function(){for(var e=this.dateLocale.firstDayOfWeek,t=this.dateLocale.shortDays,n=document.createElement("tr"),o=0;o<7;o++){var i=document.createElement("th");i.textContent=t[(o+e)%7],n.appendChild(i)}this.$element.find("thead").append(n)},t.prototype.attachScopeListeners=function(){var n=this;n.$scope.$on("md-calendar-parent-changed",function(e,t){n.calendarCtrl.changeSelectedDate(t),n.changeDisplayDate(t)}),n.$scope.$on("md-calendar-parent-action",de.bind(this,this.handleKeyEvent))},t.prototype.handleKeyEvent=function(e,t){var n=this.calendarCtrl,o=n.displayDate;if("select"===t)n.setNgModelValue(o);else{var i=null,r=this.dateUtil;switch(t){case"move-right":i=r.incrementDays(o,1);break;case"move-left":i=r.incrementDays(o,-1);break;case"move-page-down":i=r.incrementMonths(o,1);break;case"move-page-up":i=r.incrementMonths(o,-1);break;case"move-row-down":i=r.incrementDays(o,7);break;case"move-row-up":i=r.incrementDays(o,-7);break;case"start":i=r.getFirstDateOfMonth(o);break;case"end":i=r.getLastDateOfMonth(o)}i&&(i=this.dateUtil.clampDate(i,n.minDate,n.maxDate),this.changeDisplayDate(i).then(function(){n.focus(i)}))}}}(),function(){function e(e,t){var d=e('<md-icon md-svg-src="'+t.mdTabsArrow+'"></md-icon>')({})[0];return{require:["^^mdCalendar","^^mdCalendarMonth","mdCalendarMonthBody"],scope:{offset:"=mdMonthOffset"},controller:n,controllerAs:"mdMonthBodyCtrl",bindToController:!0,link:function(e,t,n,o){var i=o[0],r=o[1],a=o[2];a.calendarCtrl=i,a.monthCtrl=r,a.arrowIcon=d.cloneNode(!0),e.$watch(function(){return a.offset},function(e){de.isNumber(e)&&a.generateContent()})}}}function n(e,t,n){this.$element=e,this.dateUtil=t,this.dateLocale=n,this.monthCtrl=null,this.calendarCtrl=null,this.offset=null,this.focusAfterAppend=null}e.$inject=["$compile","$$mdSvgRegistry"],n.$inject=["$element","$$mdDateUtil","$mdDateLocale"],de.module("material.components.datepicker").directive("mdCalendarMonthBody",e),n.prototype.generateContent=function(){var e=this.dateUtil.incrementMonths(this.calendarCtrl.firstRenderableDate,this.offset);this.$element.empty().append(this.buildCalendarForMonth(e)),this.focusAfterAppend&&(this.focusAfterAppend.classList.add(this.calendarCtrl.FOCUSED_DATE_CLASS),this.focusAfterAppend.focus(),this.focusAfterAppend=null)},n.prototype.buildDateCell=function(e){var t=this.monthCtrl,n=this.calendarCtrl,o=document.createElement("td");if(o.tabIndex=-1,o.classList.add("md-calendar-date"),o.setAttribute("role","gridcell"),e){o.setAttribute("tabindex","-1"),o.setAttribute("aria-label",this.dateLocale.longDateFormatter(e)),o.id=n.getDateId(e,"month"),o.setAttribute("data-timestamp",e.getTime()),this.dateUtil.isSameDay(e,n.today)&&o.classList.add(n.TODAY_CLASS),this.dateUtil.isValidDate(n.selectedDate)&&this.dateUtil.isSameDay(e,n.selectedDate)&&(o.classList.add(n.SELECTED_DATE_CLASS),o.setAttribute("aria-selected","true"));var i=this.dateLocale.dates[e.getDate()];if(this.isDateEnabled(e)){var r=document.createElement("span");r.classList.add("md-calendar-date-selection-indicator"),r.textContent=i,o.appendChild(r),o.addEventListener("click",t.cellClickHandler),n.displayDate&&this.dateUtil.isSameDay(e,n.displayDate)&&(this.focusAfterAppend=o)}else o.classList.add("md-calendar-date-disabled"),o.textContent=i}return o},n.prototype.isDateEnabled=function(e){return this.dateUtil.isDateWithinRange(e,this.calendarCtrl.minDate,this.calendarCtrl.maxDate)&&(!de.isFunction(this.calendarCtrl.dateFilter)||this.calendarCtrl.dateFilter(e))},n.prototype.buildDateRow=function(e){var t=document.createElement("tr");return t.setAttribute("role","row"),t.setAttribute("aria-label",this.dateLocale.weekNumberFormatter(e)),t},n.prototype.buildCalendarForMonth=function(e){var t=this.dateUtil.isValidDate(e)?e:new Date,n=this.dateUtil.getFirstDateOfMonth(t),o=this.getLocaleDay_(n),i=this.dateUtil.getNumberOfDaysInMonth(t),r=document.createDocumentFragment(),a=1,d=this.buildDateRow(a);r.appendChild(d);var s=this.offset===this.monthCtrl.items.length-1,l=0,c=document.createElement("td"),m=document.createElement("span"),u=this.calendarCtrl;if(m.textContent=this.dateLocale.monthHeaderFormatter(t),c.appendChild(m),c.classList.add("md-calendar-month-label"),u.maxDate&&n>u.maxDate?c.classList.add("md-calendar-month-label-disabled"):u.mode||(c.addEventListener("click",this.monthCtrl.headerClickHandler),c.setAttribute("data-timestamp",n.getTime()),c.setAttribute("aria-label",this.dateLocale.monthFormatter(t)),c.classList.add("md-calendar-label-clickable"),c.appendChild(this.arrowIcon.cloneNode(!0))),o<=2){c.setAttribute("colspan","7");var p=this.buildDateRow();if(p.appendChild(c),r.insertBefore(p,d),s)return r}else l=3,c.setAttribute("colspan","3"),d.appendChild(c);for(var h=l;h<o;h++)d.appendChild(this.buildDateCell());for(var f=o,g=n,b=1;b<=i;b++){if(7===f){if(s)return r;f=0,a++,d=this.buildDateRow(a),r.appendChild(d)}g.setDate(b);var v=this.buildDateCell(g);d.appendChild(v),f++}for(;d.childNodes.length<7;)d.appendChild(this.buildDateCell());for(;r.childNodes.length<6;){for(var E=this.buildDateRow(),$=0;$<7;$++)E.appendChild(this.buildDateCell());r.appendChild(E)}return r},n.prototype.getLocaleDay_=function(e){return(e.getDay()+(7-this.dateLocale.firstDayOfWeek))%7}}(),function(){e.$inject=["$element","$scope","$animate","$q","$$mdDateUtil","$mdUtil"],de.module("material.components.datepicker").directive("mdCalendarYear",function(){return{template:'<div class="md-calendar-scroll-mask"><md-virtual-repeat-container class="md-calendar-scroll-container"><table role="grid" tabindex="0" class="md-calendar" aria-readonly="true"><tbody md-calendar-year-body role="rowgroup" md-virtual-repeat="i in yearCtrl.items" md-year-offset="$index" class="md-calendar-year" md-start-index="yearCtrl.getFocusedYearIndex()" md-item-size="'+n+'"><tr aria-hidden="true" md-force-height="\''+n+"px'\"></tr></tbody></table></md-virtual-repeat-container></div>",require:["^^mdCalendar","mdCalendarYear"],controller:e,controllerAs:"yearCtrl",bindToController:!0,link:function(e,t,n,o){var i=o[0],r=o[1];r.initialize(i)}}});var n=88;function e(e,t,n,o,i,r){this.$element=e,this.$scope=t,this.$animate=n,this.$q=o,this.dateUtil=i,this.calendarScroller=e[0].querySelector(".md-virtual-repeat-scroller"),this.isInitialized=!1,this.isMonthTransitionInProgress=!1,this.$mdUtil=r;var a=this;this.cellClickHandler=function(){a.onTimestampSelected(i.getTimestampFromNode(this))}}e.prototype.initialize=function(e){this.items={length:this.dateUtil.getYearDistance(e.firstRenderableDate,e.lastRenderableDate)+1},this.calendarCtrl=e,this.attachScopeListeners(),e.updateVirtualRepeat(),e.ngModelCtrl&&e.ngModelCtrl.$render()},e.prototype.getFocusedYearIndex=function(){var e=this.calendarCtrl;return this.dateUtil.getYearDistance(e.firstRenderableDate,e.displayDate||e.selectedDate||e.today)},e.prototype.changeDate=function(e){if(!this.isInitialized)return this.calendarCtrl.hideVerticalScrollbar(this),this.isInitialized=!0,this.$q.when();if(this.dateUtil.isValidDate(e)&&!this.isMonthTransitionInProgress){var t=this,n=this.animateDateChange(e);return t.isMonthTransitionInProgress=!0,t.calendarCtrl.displayDate=e,n.then(function(){t.isMonthTransitionInProgress=!1})}},e.prototype.animateDateChange=function(e){if(this.dateUtil.isValidDate(e)){var t=this.dateUtil.getYearDistance(this.calendarCtrl.firstRenderableDate,e);this.calendarScroller.scrollTop=t*n}return this.$q.when()},e.prototype.handleKeyEvent=function(e,t){var n=this,o=n.calendarCtrl,i=o.displayDate;if("select"===t)n.changeDate(i).then(function(){n.onTimestampSelected(i)});else{var r=null,a=n.dateUtil;switch(t){case"move-right":r=a.incrementMonths(i,1);break;case"move-left":r=a.incrementMonths(i,-1);break;case"move-row-down":r=a.incrementMonths(i,6);break;case"move-row-up":r=a.incrementMonths(i,-6)}if(r){var d=o.minDate?a.getFirstDateOfMonth(o.minDate):null,s=o.maxDate?a.getFirstDateOfMonth(o.maxDate):null;r=a.getFirstDateOfMonth(n.dateUtil.clampDate(r,d,s)),n.changeDate(r).then(function(){o.focus(r)})}}},e.prototype.attachScopeListeners=function(){var n=this;n.$scope.$on("md-calendar-parent-changed",function(e,t){n.calendarCtrl.changeSelectedDate(t?n.dateUtil.getFirstDateOfMonth(t):t),n.changeDate(t)}),n.$scope.$on("md-calendar-parent-action",de.bind(n,n.handleKeyEvent))},e.prototype.onTimestampSelected=function(e){var t=this.calendarCtrl;t.mode?this.$mdUtil.nextTick(function(){t.setNgModelValue(e)}):t.setCurrentView("month",e)}}(),function(){function e(e,t,n){this.$element=e,this.dateUtil=t,this.dateLocale=n,this.calendarCtrl=null,this.yearCtrl=null,this.offset=null,this.focusAfterAppend=null}e.$inject=["$element","$$mdDateUtil","$mdDateLocale"],de.module("material.components.datepicker").directive("mdCalendarYearBody",function(){return{require:["^^mdCalendar","^^mdCalendarYear","mdCalendarYearBody"],scope:{offset:"=mdYearOffset"},controller:e,controllerAs:"mdYearBodyCtrl",bindToController:!0,link:function(e,t,n,o){var i=o[0],r=o[1],a=o[2];a.calendarCtrl=i,a.yearCtrl=r,e.$watch(function(){return a.offset},function(e){de.isNumber(e)&&a.generateContent()})}}}),e.prototype.generateContent=function(){var e=this.dateUtil.incrementYears(this.calendarCtrl.firstRenderableDate,this.offset);this.$element.empty().append(this.buildCalendarForYear(e)),this.focusAfterAppend&&(this.focusAfterAppend.classList.add(this.calendarCtrl.FOCUSED_DATE_CLASS),this.focusAfterAppend.focus(),this.focusAfterAppend=null)},e.prototype.buildMonthCell=function(e,t){var n=this.calendarCtrl,o=this.yearCtrl,i=this.buildBlankCell(),r=new Date(e,t,1);i.setAttribute("aria-label",this.dateLocale.monthFormatter(r)),i.id=n.getDateId(r,"year"),i.setAttribute("data-timestamp",r.getTime()),this.dateUtil.isSameMonthAndYear(r,n.today)&&i.classList.add(n.TODAY_CLASS),this.dateUtil.isValidDate(n.selectedDate)&&this.dateUtil.isSameMonthAndYear(r,n.selectedDate)&&(i.classList.add(n.SELECTED_DATE_CLASS),i.setAttribute("aria-selected","true"));var a=this.dateLocale.shortMonths[t];if(this.dateUtil.isMonthWithinRange(r,n.minDate,n.maxDate)){var d=document.createElement("span");d.classList.add("md-calendar-date-selection-indicator"),d.textContent=a,i.appendChild(d),i.addEventListener("click",o.cellClickHandler),n.displayDate&&this.dateUtil.isSameMonthAndYear(r,n.displayDate)&&(this.focusAfterAppend=i)}else i.classList.add("md-calendar-date-disabled"),i.textContent=a;return i},e.prototype.buildBlankCell=function(){var e=document.createElement("td");return e.tabIndex=-1,e.classList.add("md-calendar-date"),e.setAttribute("role","gridcell"),e.setAttribute("tabindex","-1"),e},e.prototype.buildCalendarForYear=function(e){var t,n=e.getFullYear(),o=document.createDocumentFragment(),i=document.createElement("tr"),r=document.createElement("td");for(r.className="md-calendar-month-label",r.textContent=n,i.appendChild(r),t=0;t<6;t++)i.appendChild(this.buildMonthCell(n,t));o.appendChild(i);var a=document.createElement("tr");for(a.appendChild(this.buildBlankCell()),t=6;t<12;t++)a.appendChild(this.buildMonthCell(n,t));return o.appendChild(a),o}}(),de.module("material.components.datepicker").config(["$provide",function(e){function t(){this.months=null,this.shortMonths=null,this.days=null,this.shortDays=null,this.dates=null,this.firstDayOfWeek=0,this.formatDate=null,this.parseDate=null,this.monthHeaderFormatter=null,this.weekNumberFormatter=null,this.longDateFormatter=null,this.isDateComplete=null,this.msgCalendar="",this.msgOpenCalendar=""}(t.prototype.$get=function(e,i){for(var t=e.DATETIME_FORMATS.SHORTDAY.map(function(e){return e.substring(0,1)}),n=Array(32),o=1;o<=31;o++)n[o]=o;var r=new Date(1880,0,1),a=new Date(r.getFullYear()+250,0,1),d={months:this.months||e.DATETIME_FORMATS.MONTH,shortMonths:this.shortMonths||e.DATETIME_FORMATS.SHORTMONTH,days:this.days||e.DATETIME_FORMATS.DAY,shortDays:this.shortDays||t,dates:this.dates||n,firstDayOfWeek:this.firstDayOfWeek||0,formatDate:this.formatDate||function(e,t){if(!e)return"";var n=e.toLocaleTimeString(),o=e;return 0!==e.getHours()||-1===n.indexOf("11:")&&-1===n.indexOf("23:")||(o=new Date(e.getFullYear(),e.getMonth(),e.getDate(),1,0,0)),i("date")(o,"M/d/yyyy",t)},parseDate:this.parseDate||function(e){return new Date(e)},isDateComplete:this.isDateComplete||function(e){return e=e.trim(),/^(([a-zA-Z]{3,}|[0-9]{1,4}
vendor: 13,406 bytes, line 10510
10510)([ .,]+|[/-])){2}([a-zA-Z]{3,}|[0-9]{1,4})$/.test(e)},monthHeaderFormatter:this.monthHeaderFormatter||function(e){return d.shortMonths[e.getMonth()]+" "+e.getFullYear()},monthFormatter:this.monthFormatter||function(e){return d.months[e.getMonth()]+" "+e.getFullYear()},weekNumberFormatter:this.weekNumberFormatter||function(e){return"Week "+e},longDateFormatter:this.longDateFormatter||function(e){return[d.days[e.getDay()],d.months[e.getMonth()],d.dates[e.getDate()],e.getFullYear()].join(" ")},msgCalendar:this.msgCalendar||"Calendar",msgOpenCalendar:this.msgOpenCalendar||"Open calendar",firstRenderableDate:this.firstRenderableDate||r,lastRenderableDate:this.lastRenderableDate||a};return d}).$inject=["$locale","$filter"],e.provider("$mdDateLocale",new t)}]),de.module("material.components.datepicker").factory("$$mdDateUtil",function(){return{getFirstDateOfMonth:n,getNumberOfDaysInMonth:i,getDateInNextMonth:o,getDateInPreviousMonth:r,isInNextMonth:function(e,t){return a(o(e),t)},isInPreviousMonth:function(e,t){var n=r(e);return a(t,n)},getDateMidpoint:function(e,t){return c((e.getTime()+t.getTime())/2)},isSameMonthAndYear:a,getWeekOfMonth:function(e){var t=n(e);return Math.floor((t.getDay()+e.getDate()-1)/7)},incrementDays:function(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+t)},incrementMonths:d,getLastDateOfMonth:function(e){return new Date(e.getFullYear(),e.getMonth(),i(e))},isSameDay:function(e,t){return e.getDate()==t.getDate()&&a(e,t)},getMonthDistance:function(e,t){return 12*(t.getFullYear()-e.getFullYear())+(t.getMonth()-e.getMonth())},isValidDate:s,setDateTimeToMidnight:l,createDateAtMidnight:c,isDateWithinRange:function(e,t,n){var o=c(e),i=s(t)?c(t):null,r=s(n)?c(n):null;return(!i||i<=o)&&(!r||o<=r)},incrementYears:function(e,t){return d(e,12*t)},getYearDistance:function(e,t){return t.getFullYear()-e.getFullYear()},clampDate:function(e,t,n){var o=e;return t&&e<t&&(o=new Date(t.getTime())),n&&n<e&&(o=new Date(n.getTime())),o},getTimestampFromNode:function(e){if(e&&e.hasAttribute("data-timestamp"))return Number(e.getAttribute("data-timestamp"))},isMonthWithinRange:function(e,t,n){var o=e.getMonth(),i=e.getFullYear();return(!t||t.getFullYear()<i||t.getMonth()<=o)&&(!n||n.getFullYear()>i||n.getMonth()>=o)}};function n(e){return new Date(e.getFullYear(),e.getMonth(),1)}function i(e){return new Date(e.getFullYear(),e.getMonth()+1,0).getDate()}function o(e){return new Date(e.getFullYear(),e.getMonth()+1,1)}function r(e){return new Date(e.getFullYear(),e.getMonth()-1,1)}function a(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function d(e,t){var n=new Date(e.getFullYear(),e.getMonth()+t,1),o=i(n);return o<e.getDate()?n.setDate(o):n.setDate(e.getDate()),n}function s(e){return e&&e.getTime&&!isNaN(e.getTime())}function l(e){s(e)&&e.setHours(0,0,0,0)}function c(e){var t;return l(t=de.isUndefined(e)?new Date:new Date(e)),t}}),function(){function e(a,m,u,p){return{template:function(e,t){var n=t.mdHideIcons,o=t.ariaLabel||t.mdPlaceholder,i="all"===n||"calendar"===n?"":'<md-button class="md-datepicker-button md-icon-button" type="button" tabindex="-1" aria-hidden="true" ng-click="ctrl.openCalendarPane($event)"><md-icon class="md-datepicker-calendar-icon" aria-label="md-calendar" md-svg-src="'+a.mdCalendar+'"></md-icon></md-button>',r="";return"all"!==n&&"triangle"!==n&&(r='<md-button type="button" md-no-ink class="md-datepicker-triangle-button md-icon-button" ng-click="ctrl.openCalendarPane($event)" aria-label="{{::ctrl.locale.msgOpenCalendar}}"><div class="md-datepicker-expand-triangle"></div></md-button>',e.addClass(d)),i+'<div class="md-datepicker-input-container" ng-class="{\'md-datepicker-focused\': ctrl.isFocused}"><input '+(o?'aria-label="'+o+'" ':"")+'class="md-datepicker-input" aria-haspopup="true" aria-expanded="{{ctrl.isCalendarOpen}}" ng-focus="ctrl.setFocused(true)" ng-blur="ctrl.setFocused(false)"> '+r+'</div><div class="md-datepicker-calendar-pane md-whiteframe-z1" id="{{::ctrl.calendarPaneId}}"><div class="md-datepicker-input-mask"><div class="md-datepicker-input-mask-opaque"></div></div><div class="md-datepicker-calendar"><md-calendar role="dialog" aria-label="{{::ctrl.locale.msgCalendar}}" md-current-view="{{::ctrl.currentView}}" md-mode="{{::ctrl.mode}}" md-min-date="ctrl.minDate" md-max-date="ctrl.maxDate" md-date-filter="ctrl.dateFilter" ng-model="ctrl.date" ng-if="ctrl.isCalendarOpen"></md-calendar></div></div>'},require:["ngModel","mdDatepicker","?^mdInputContainer","?^form"],scope:{minDate:"=mdMinDate",maxDate:"=mdMaxDate",placeholder:"@mdPlaceholder",currentView:"@mdCurrentView",mode:"@mdMode",dateFilter:"=mdDateFilter",isOpen:"=?mdIsOpen",debounceInterval:"=mdDebounceInterval",dateLocale:"=mdDateLocale"},controller:t,controllerAs:"ctrl",bindToController:!0,link:function(e,t,n,o){var i=o[0],r=o[1],a=o[2],d=o[3],s=m.parseAttributeBoolean(n.mdNoAsterisk);if(r.configureNgModel(i,a,p),a){var l=t[0].querySelector(".md-errors-spacer");l&&t.after(de.element("<div>").append(l)),a.setHasPlaceholder(n.mdPlaceholder),a.input=t,a.element.addClass(h).toggleClass(f,"calendar"!==n.mdHideIcons&&"all"!==n.mdHideIcons),a.label?s||n.$observe("required",function(e){a.label.toggleClass("md-required",!!e)}):u.expect(t,"aria-label",n.mdPlaceholder),e.$watch(a.isErrorGetter||function(){return i.$invalid&&(i.$touched||d&&d.$submitted)},a.setInvalid)}else if(d)var c=e.$watch(function(){return d.$submitted},function(e){e&&(r.updateErrorState(),c())})}}}t.$inject=["$scope","$element","$attrs","$window","$mdConstant","$mdTheming","$mdUtil","$mdDateLocale","$$mdDateUtil","$$rAF","$filter","$timeout"],e.$inject=["$$mdSvgRegistry","$mdUtil","$mdAria","inputDirective"],de.module("material.components.datepicker").directive("mdDatepicker",e);var i="md-datepicker-invalid",m="md-datepicker-open",h="_md-datepicker-floating-label",f="_md-datepicker-has-calendar-icon",d="_md-datepicker-has-triangle-icon",p=/ipad|iphone|ipod|android/i;function t(e,t,n,o,i,r,a,d,s,l,c,m){this.$window=o,this.dateUtil=s,this.$mdConstant=i,this.$mdUtil=a,this.$$rAF=l,this.$mdDateLocale=d,this.$timeout=m,this.documentElement=de.element(document.documentElement),this.ngModelCtrl=null,this.inputElement=t[0].querySelector("input"),this.ngInputElement=de.element(this.inputElement),this.inputContainer=t[0].querySelector(".md-datepicker-input-container"),this.calendarPane=t[0].querySelector(".md-datepicker-calendar-pane"),this.calendarButton=t[0].querySelector(".md-datepicker-button"),this.inputMask=de.element(t[0].querySelector(".md-datepicker-input-mask-opaque")),this.$element=t,this.$attrs=n,this.$scope=e,this.date=null,this.isFocused=!1,this.isDisabled,this.setDisabled(t[0].disabled||de.isString(n.disabled)),this.isCalendarOpen=!1,this.openOnFocus=n.hasOwnProperty("mdOpenOnFocus"),this.mdInputContainer=null,this.calendarPaneOpenedFrom=null,this.calendarPaneId="md-date-pane-"+a.nextUid(),this.bodyClickHandler=de.bind(this,this.handleBodyClick),this.windowEventName=p.test(navigator.userAgent||navigator.vendor||B.opera)?"orientationchange":"resize",this.windowEventHandler=a.debounce(de.bind(this,this.closeCalendarPane),100),this.windowBlurHandler=de.bind(this,this.handleWindowBlur),this.ngDateFilter=c("date"),this.leftMargin=20,this.topMargin=null,n.tabindex?(this.ngInputElement.attr("tabindex",n.tabindex),n.$set("tabindex",null)):n.$set("tabindex","-1"),n.$set("aria-owns",this.calendarPaneId),r(t),r(de.element(this.calendarPane));var u=this;e.$on("$destroy",function(){u.detachCalendarPane()}),n.mdIsOpen&&e.$watch("ctrl.isOpen",function(e){e?u.openCalendarPane({target:u.inputElement}):u.closeCalendarPane()}),1===de.version.major&&de.version.minor<=4&&this.$onInit()}t.prototype.$onInit=function(){this.locale=this.dateLocale?de.extend({},this.$mdDateLocale,this.dateLocale):this.$mdDateLocale,this.installPropertyInterceptors(),this.attachChangeListeners(),this.attachInteractionListeners()},t.prototype.configureNgModel=function(e,t,n){this.ngModelCtrl=e,this.mdInputContainer=t,this.$attrs.$set("type","date"),n[0].link.pre(this.$scope,{on:de.noop,val:de.noop,0:{}},this.$attrs,[e]);var o=this;o.ngModelCtrl.$formatters.push(function(e){var t=de.isDefined(e)?e:null;if(!(e instanceof Date)&&(t=Date.parse(e),!isNaN(t)&&de.isNumber(t)&&(e=new Date(t)),e&&!(e instanceof Date)))throw Error("The ng-model for md-datepicker must be a Date instance or a value that can be parsed into a date. Currently the model is of type: "+typeof e);return o.onExternalChange(e),e}),e.$viewChangeListeners.unshift(de.bind(this,this.updateErrorState));var i=o.$mdUtil.getModelOption(e,"updateOn");i&&this.ngInputElement.on(i,de.bind(this.$element,this.$element.triggerHandler,i))},t.prototype.attachChangeListeners=function(){var n=this;n.$scope.$on("md-calendar-change",function(e,t){n.setModelValue(t),n.onExternalChange(t),n.closeCalendarPane()}),n.ngInputElement.on("input",de.bind(n,n.resizeInputElement));var e=de.isDefined(this.debounceInterval)?this.debounceInterval:500;n.ngInputElement.on("input",n.$mdUtil.debounce(n.handleInputEvent,e,n))},t.prototype.attachInteractionListeners=function(){var t=this,n=this.$scope,o=this.$mdConstant.KEY_CODE;t.ngInputElement.on("keydown",function(e){e.altKey&&e.keyCode==o.DOWN_ARROW&&(t.openCalendarPane(e),n.$digest())}),t.openOnFocus&&(t.ngInputElement.on("focus",de.bind(t,t.openCalendarPane)),de.element(t.$window).on("blur",t.windowBlurHandler),n.$on("$destroy",function(){de.element(t.$window).off("blur",t.windowBlurHandler)})),n.$on("md-calendar-close",function(){t.closeCalendarPane()})},t.prototype.installPropertyInterceptors=function(){var t=this;if(this.$attrs.ngDisabled){var e=this.$scope.$parent;e&&e.$watch(this.$attrs.ngDisabled,function(e){t.setDisabled(e)})}Object.defineProperty(this,"placeholder",{get:function(){return t.inputElement.placeholder},set:function(e){t.inputElement.placeholder=e||""}})},t.prototype.setDisabled=function(e){this.isDisabled=e,this.inputElement.disabled=e,this.calendarButton&&(this.calendarButton.disabled=e)},t.prototype.updateErrorState=function(e){var t=e||this.date;if(this.clearErrorState(),this.dateUtil.isValidDate(t)){if(t=this.dateUtil.createDateAtMidnight(t),this.dateUtil.isValidDate(this.minDate)){var n=this.dateUtil.createDateAtMidnight(this.minDate);this.ngModelCtrl.$setValidity("mindate",n<=t)}if(this.dateUtil.isValidDate(this.maxDate)){var o=this.dateUtil.createDateAtMidnight(this.maxDate);this.ngModelCtrl.$setValidity("maxdate",t<=o)}de.isFunction(this.dateFilter)&&this.ngModelCtrl.$setValidity("filtered",this.dateFilter(t))}else this.ngModelCtrl.$setValidity("valid",null==t);de.element(this.inputContainer).toggleClass(i,!this.ngModelCtrl.$valid)},t.prototype.clearErrorState=function(){this.inputContainer.classList.remove(i),["mindate","maxdate","filtered","valid"].forEach(function(e){this.ngModelCtrl.$setValidity(e,!0)},this)},t.prototype.resizeInputElement=function(){this.inputElement.size=this.inputElement.value.length+3},t.prototype.handleInputEvent=function(){var e=this.inputElement.value,t=e?this.locale.parseDate(e):null;this.dateUtil.setDateTimeToMidnight(t),(""==e||this.dateUtil.isValidDate(t)&&this.locale.isDateComplete(e)&&this.isDateEnabled(t))&&(this.setModelValue(t),this.date=t),this.updateErrorState(t)},t.prototype.isDateEnabled=function(e){return this.dateUtil.isDateWithinRange(e,this.minDate,this.maxDate)&&(!de.isFunction(this.dateFilter)||this.dateFilter(e))},t.prototype.attachCalendarPane=function(){var e=this.calendarPane,t=document.body;e.style.transform="",this.$element.addClass(m),this.mdInputContainer&&this.mdInputContainer.element.addClass(m),de.element(t).addClass("md-datepicker-is-showing");var n=this.inputContainer.getBoundingClientRect(),o=t.getBoundingClientRect();(!this.topMargin||this.topMargin<0)&&(this.topMargin=(this.inputMask.parent().prop("clientHeight")-this.ngInputElement.prop("clientHeight"))/2);var i=n.top-o.top-this.topMargin,r=n.left-o.left-this.leftMargin,a=o.top<0&&0==document.body.scrollTop?-o.top:document.body.scrollTop,d=o.left<0&&0==document.body.scrollLeft?-o.left:document.body.scrollLeft,s=a+this.$window.innerHeight,l=d+this.$window.innerWidth;if(this.inputMask.css({position:"absolute",left:this.leftMargin+"px",top:this.topMargin+"px",width:n.width-1+"px",height:n.height-2+"px"}),l<r+360){if(0<l-360)r=l-360;else{r=d;var c=this.$window.innerWidth/360;e.style.transform="scale("+c+")"}e.classList.add("md-datepicker-pos-adjusted")}s<i+368&&a<s-368&&(i=s-368,e.classList.add("md-datepicker-pos-adjusted")),e.style.left=r+"px",e.style.top=i+"px",document.body.appendChild(e),this.$$rAF(function(){e.classList.add("md-pane-open")})},t.prototype.detachCalendarPane=function(){this.$element.removeClass(m),this.mdInputContainer&&this.mdInputContainer.element.removeClass(m),de.element(document.body).removeClass("md-datepicker-is-showing"),this.calendarPane.classList.remove("md-pane-open"),this.calendarPane.classList.remove("md-datepicker-pos-adjusted"),this.isCalendarOpen&&this.$mdUtil.enableScrolling(),this.calendarPane.parentNode&&this.calendarPane.parentNode.removeChild(this.calendarPane)},t.prototype.openCalendarPane=function(e){if(!this.isCalendarOpen&&!this.isDisabled&&!this.inputFocusedOnWindowBlur){this.isCalendarOpen=this.isOpen=!0,this.calendarPaneOpenedFrom=e.target,this.$mdUtil.disableScrollAround(this.calendarPane),this.attachCalendarPane(),this.focusCalendar(
10510),this.evalAttr("ngFocus");var t=this;this.$mdUtil.nextTick(function(){t.documentElement.on("click touchstart",t.bodyClickHandler)},!1),B.addEventListener(this.windowEventName,this.windowEventHandler)}},t.prototype.closeCalendarPane=function(){if(this.isCalendarOpen){var e=this;e.detachCalendarPane(),e.ngModelCtrl.$setTouched(),e.evalAttr("ngBlur"),e.documentElement.off("click touchstart",e.bodyClickHandler),B.removeEventListener(e.windowEventName,e.windowEventHandler),e.calendarPaneOpenedFrom.focus(),e.calendarPaneOpenedFrom=null,e.openOnFocus?e.$timeout(t):t()}function t(){e.isCalendarOpen=e.isOpen=!1}},t.prototype.getCalendarCtrl=function(){return de.element(this.calendarPane.querySelector("md-calendar")).controller("mdCalendar")},t.prototype.focusCalendar=function(){var e=this;this.$mdUtil.nextTick(function(){e.getCalendarCtrl().focus()},!1)},t.prototype.setFocused=function(e){e||this.ngModelCtrl.$setTouched(),this.openOnFocus||this.evalAttr(e?"ngFocus":"ngBlur"),this.isFocused=e},t.prototype.handleBodyClick=function(e){this.isCalendarOpen&&(this.$mdUtil.getClosest(e.target,"md-calendar")||this.closeCalendarPane(),this.$scope.$digest())},t.prototype.handleWindowBlur=function(){this.inputFocusedOnWindowBlur=document.activeElement===this.inputElement},t.prototype.evalAttr=function(e){this.$attrs[e]&&this.$scope.$parent.$eval(this.$attrs[e])},t.prototype.setModelValue=function(e){var t=this.$mdUtil.getModelOption(this.ngModelCtrl,"timezone");this.ngModelCtrl.$setViewValue(this.ngDateFilter(e,"yyyy-MM-dd",t))},t.prototype.onExternalChange=function(e){var t=this.$mdUtil.getModelOption(this.ngModelCtrl,"timezone");this.date=e,this.inputElement.value=this.locale.formatDate(e,t),this.mdInputContainer&&this.mdInputContainer.setHasValue(!!e),this.resizeInputElement(),this.updateErrorState()}}(),de.module("material.components.icon").directive("mdIcon",["$mdIcon","$mdTheming","$mdAria","$sce",function(s,l,c,e){return{restrict:"E",link:function(e,t,n){l(t);var o=n.mdFontIcon,i=s.fontSet(n.mdFontSet);n.mdSvgIcon||n.mdSvgSrc||(n.mdFontIcon&&t.addClass("md-font "+n.mdFontIcon),t.addClass(i)),n.$observe("mdFontIcon",d),n.$observe("mdFontSet",d),t[0].getAttribute(n.$attr.mdSvgSrc);var r,a=n.$normalize(n.$attr.mdSvgIcon||n.$attr.mdSvgSrc||"");function d(){if(!n.mdSvgIcon&&!n.mdSvgSrc){n.mdFontIcon&&(t.removeClass(o),t.addClass(n.mdFontIcon),o=n.mdFontIcon);var e=s.fontSet(n.mdFontSet);i!==e&&(t.removeClass(i),t.addClass(e),i=e)}}n.role||(c.expect(t,"role","img"),n.role="img"),"img"!==n.role||n.ariaHidden||c.hasAriaLabel(t)||(n.alt?c.expect(t,"aria-label",n.alt):c.parentHasAriaLabel(t,2)?c.expect(t,"aria-hidden","true"):(r=n.mdFontIcon||n.mdSvgIcon||t.text())?c.expect(t,"aria-label",r):c.expect(t,"aria-hidden","true")),a&&n.$observe(a,function(e){t.empty(),e&&s(e).then(function(e){t.empty(),t.append(e)})})}}}]),function(){a.$inject=["config","$templateRequest","$q","$log","$mdUtil","$sce"],de.module("material.components.icon").constant("$$mdSvgRegistry",{mdTabsArrow:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTUuNCw3LjQgMTQsNiA4LDEyIDE0LDE4IDE1LjQsMTYuNiAxMC44LDEyICIvPjwvZz48L3N2Zz4=",mdClose:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwYXRoIGQ9Ik0xOSA2LjQxbC0xLjQxLTEuNDEtNS41OSA1LjU5LTUuNTktNS41OS0xLjQxIDEuNDEgNS41OSA1LjU5LTUuNTkgNS41OSAxLjQxIDEuNDEgNS41OS01LjU5IDUuNTkgNS41OSAxLjQxLTEuNDEtNS41OS01LjU5eiIvPjwvZz48L3N2Zz4=",mdCancel:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwYXRoIGQ9Ik0xMiAyYy01LjUzIDAtMTAgNC40Ny0xMCAxMHM0LjQ3IDEwIDEwIDEwIDEwLTQuNDcgMTAtMTAtNC40Ny0xMC0xMC0xMHptNSAxMy41OWwtMS40MSAxLjQxLTMuNTktMy41OS0zLjU5IDMuNTktMS40MS0xLjQxIDMuNTktMy41OS0zLjU5LTMuNTkgMS40MS0xLjQxIDMuNTkgMy41OSAzLjU5LTMuNTkgMS40MSAxLjQxLTMuNTkgMy41OSAzLjU5IDMuNTl6Ii8+PC9nPjwvc3ZnPg==",mdMenu:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0zLDZIMjFWOEgzVjZNMywxMUgyMVYxM0gzVjExTTMsMTZIMjFWMThIM1YxNloiIC8+PC9zdmc+",mdToggleArrow:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNDggNDgiPjxwYXRoIGQ9Ik0yNCAxNmwtMTIgMTIgMi44MyAyLjgzIDkuMTctOS4xNyA5LjE3IDkuMTcgMi44My0yLjgzeiIvPjxwYXRoIGQ9Ik0wIDBoNDh2NDhoLTQ4eiIgZmlsbD0ibm9uZSIvPjwvc3ZnPg==",mdCalendar:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgM2gtMVYxaC0ydjJIOFYxSDZ2Mkg1Yy0xLjExIDAtMS45OS45LT
10510EuOTkgMkwzIDE5YzAgMS4xLjg5IDIgMiAyaDE0YzEuMSAwIDItLjkgMi0yVjVjMC0xLjEtLjktMi0yLTJ6bTAgMTZINVY4aDE0djExek03IDEwaDV2NUg3eiIvPjwvc3ZnPg==",mdChecked:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwYXRoIGQ9Ik05IDE2LjE3TDQuODMgMTJsLTEuNDIgMS40MUw5IDE5IDIxIDdsLTEuNDEtMS40MXoiLz48L2c+PC9zdmc+"}).provider("$mdIcon",e);var r={defaultViewBoxSize:24,defaultFontSet:"material-icons",fontSets:[]};function e(){}function o(e,t){this.url=e,this.viewBoxSize=t||r.defaultViewBoxSize}function a(a,r,d,s,l,t){var o={},c={},n=/[-\w@:%+.~#?&//=]{2,}\.[a-z]{2,4}\b(\/[-\w@:%+.~#?&//=]*)?/i,m=/^data:image\/svg\+xml[\s*;\w\-=]*?(base64)?,(.*)$/i;return f.prototype={clone:function(){return this.element.cloneNode(!0)},prepare:function(){var e=this.config?this.config.viewBoxSize:a.defaultViewBoxSize;de.forEach({fit:"",height:"100%",width:"100%",preserveAspectRatio:"xMidYMid meet",viewBox:this.element.getAttribute("viewBox")||"0 0 "+e+" "+e,focusable:!1},function(e,t){this.element.setAttribute(t,e)},this)}},e.fontSet=function(t){if(de.isUndefined(t)||!t||!t.length)return a.defaultFontSet;var n=t;return de.forEach(a.fontSets,function(e){e.alias===t&&(n=e.fontSet||n)}),n},e;function e(e){return e=e||"",de.isString(e)||(e=t.getTrustedUrl(e)),o[e]?d.when(function(e){var i,t,n=e.clone(),o=l.nextUid();if(!isFinite(Number(o)))throw new Error("Unsafe and unexpected non-number result from $mdUtil.nextUid().");i="_cache"+o,n.id&&(n.id+=i);var r=function(e,t,n,o){return[t,n,i,o].join("")};de.forEach(n.querySelectorAll("[id]"),function(e){e.id+=i}),n.innerHTML===se?(t=(t=(t=l.getInnerHTML(n)).replace(/(.*url\(#)(\w*)(\).*)/g,r)).replace(/(.*xlink:href="#)(\w*)(".*)/g,r),n=de.element(t)[0]):(n.innerHTML=n.innerHTML.replace(/(.*url\(#)(\w*)(\).*)/g,r),n.innerHTML=n.innerHTML.replace(/(.*xlink:href="#)(\w*)(".*)/g,r));return n}(o[e])):n.test(e)||m.test(e)?h(e).then(i(e)):(-1===e.indexOf(":")&&(e="$default:"+e),(a[e]?u:p)(e).then(i(e)))}function i(n){return function(e){var t;return o[n]=(t=e,de.isDefined(t.element)&&de.isDefined(t.config)?e:new f(e,a[n])),o[n].clone()}}function u(e){var t=a[e];return h(t.url).then(function(e){return new f(e,t)})}function p(o){var e=o.substring(0,o.lastIndexOf(":"))||"$default",i=a[e];return i?h(i.url).then(function(e){var t=o.slice(o.lastIndexOf(":")+1),n=e.querySelector("#"+t);return n?new f(n,i):r(o)}):r(o);function r(e){var t="icon "+e+" not found";return s.warn(t),d.reject(t||e)}}function h(e){return m.test(e)?(t=e,n=m.exec(t),i=/base64/i.test(t)?B.atob(n[2]):n[2],d.when(de.element(i)[0])):(o=e,d(function(t,n){r(o,!0).then(function(e){c[o]||(c[o]=de.element("<div>").append(e)[0].querySelector("svg")),t(c[o])},function(e){var t=de.isString(e)?e:e.message||e.data||e.statusText;s.warn(t),n(e)})}));var o,t,n,i}function f(e,t){var n;if(e&&"symbol"===e.tagName.toLowerCase()){var o=e.getAttribute("viewBox");n=e.innerHTML?e.innerHTML:l.getInnerHTML(e),e=de.element('<svg xmlns="http://www.w3.org/2000/svg">').append(n)[0],o&&e.setAttribute("viewBox",o)}e&&"svg"!==e.tagName.toLowerCase()&&(e=de.element('<svg xmlns="http://www.w3.org/2000/svg">').append(e.cloneNode(!0))[0]),e.getAttribute("xmlns")||e.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.element=e,this.config=t,this.prepare()}}e.prototype={icon:function(e,t,n){return-1==e.indexOf(":")&&(e="$default:"+e),r[e]=new o(t,n),this},iconSet:function(e,t,n){return r[e]=new o(t,n),this},defaultIconSet:function(e,t){var n="$default";return r[n]||(r[n]=new o(e,t)),r[n].viewBoxSize=t||r.defaultViewBoxSize,this},defaultViewBoxSize:function(e){return r.defaultViewBoxSize=e,this},fontSet:function(e,t){return r.fontSets.push({alias:e,fontSet:t||e}),this},defaultFontSet:function(e){return r.defaultFontSet=e||"",this},defaultIconSize:function(e){return r.defaultIconSize=e,this},$get:["$templateRequest","$q","$log","$mdUtil","$sce",function(e,t,n,o,i){return a(r,e,t,n,o,i)}]}}(),function(){e.$inject=["$scope","$rootScope","$element","$attrs","$mdConstant","$document","$mdUtil","$timeout"],de.module("material.components.menuBar").controller("MenuBarController",e);var l=["handleKeyDown","handleMenuHover","scheduleOpenHoveredMenu","cancelScheduledOpen"];function e(e,t,n,o,i,r,a,d){this.$element=n,this.$attrs=o,this.$mdConstant=i,this.$mdUtil=a,this.$document=r,this.$scope=e,this.$rootScope=t,this.$timeout=
vendor: 34,131 bytes, line 10510
10510d;var s=this;de.forEach(l,function(e){s[e]=de.bind(s,s[e])})}e.prototype.init=function(){var r=this.$element,a=this.$mdUtil,e=this.$scope,d=this,t=[];r.on("keydown",this.handleKeyDown),this.parentToolbar=a.getClosest(r,"MD-TOOLBAR"),t.push(this.$rootScope.$on("$mdMenuOpen",function(e,t){-1!=d.getMenus().indexOf(t[0])&&(r[0].classList.add("md-open"),t[0].classList.add("md-open"),d.currentlyOpenMenu=t.controller("mdMenu"),d.currentlyOpenMenu.registerContainerProxy(d.handleKeyDown),d.enableOpenOnHover())})),t.push(this.$rootScope.$on("$mdMenuClose",function(e,t,n){var o=d.getMenus();if(-1!=o.indexOf(t[0])&&(r[0].classList.remove("md-open"),t[0].classList.remove("md-open")),r[0].contains(t[0])){for(var i=t[0];i&&-1==o.indexOf(i);)i=a.getClosest(i,"MD-MENU",!0);i&&(n.skipFocus||i.querySelector("button:not([disabled])").focus(),d.currentlyOpenMenu=se,d.disableOpenOnHover(),d.setKeyboardMode(!0))}})),e.$on("$destroy",function(){for(d.disableOpenOnHover();t.length;)t.shift()()}),this.setKeyboardMode(!0)},e.prototype.setKeyboardMode=function(e){e?this.$element[0].classList.add("md-keyboard-mode"):this.$element[0].classList.remove("md-keyboard-mode")},e.prototype.enableOpenOnHover=function(){if(!this.openOnHoverEnabled){var e=this;e.openOnHoverEnabled=!0,e.parentToolbar&&(e.parentToolbar.classList.add("md-has-open-menu"),e.$mdUtil.nextTick(function(){de.element(e.parentToolbar).on("click",e.handleParentClick)},!1)),de.element(e.getMenus()).on("mouseenter",e.handleMenuHover)}},e.prototype.handleMenuHover=function(e){this.setKeyboardMode(!1),this.openOnHoverEnabled&&this.scheduleOpenHoveredMenu(e)},e.prototype.disableOpenOnHover=function(){this.openOnHoverEnabled&&(this.openOnHoverEnabled=!1,this.parentToolbar&&(this.parentToolbar.classList.remove("md-has-open-menu"),de.element(this.parentToolbar).off("click",this.handleParentClick)),de.element(this.getMenus()).off("mouseenter",this.handleMenuHover))},e.prototype.scheduleOpenHoveredMenu=function(e){var t=de.element(e.currentTarget).controller("mdMenu");this.setKeyboardMode(!1),this.scheduleOpenMenu(t)},e.prototype.scheduleOpenMenu=function(e){var t=this,n=this.$timeout;e!=t.currentlyOpenMenu&&(n.cancel(t.pendingMenuOpen),t.pendingMenuOpen=n(function(){t.pendingMenuOpen=se,t.currentlyOpenMenu&&t.currentlyOpenMenu.close(!0,{closeAll:!0}),e.open()},200,!1))},e.prototype.handleKeyDown=function(e){var t,n,o,i=this.$mdConstant.KEY_CODE,r=this.currentlyOpenMenu,a=r&&r.isOpen;switch(this.setKeyboardMode(!0),e.keyCode){case i.DOWN_ARROW:r?r.focusMenuContainer():this.openFocusedMenu(),t=!0;break;case i.UP_ARROW:r&&r.close(),t=!0;break;case i.LEFT_ARROW:n=this.focusMenu(-1),a&&(o=de.element(n).controller("mdMenu"),this.scheduleOpenMenu(o)),t=!0;break;case i.RIGHT_ARROW:n=this.focusMenu(1),a&&(o=de.element(n).controller("mdMenu"),this.scheduleOpenMenu(o)),t=!0}t&&(e&&e.preventDefault&&e.preventDefault(),e&&e.stopImmediatePropagation&&e.stopImmediatePropagation())},e.prototype.focusMenu=function(e){var t=this.getMenus(),n=this.getFocusedMenuIndex();-1==n&&(n=this.getOpenMenuIndex());var o=!1;if(-1==n?o=!(n=0):(e<0&&0<n||0<e&&n<t.length-e)&&(n+=e,o=!0),o)return t[n].querySelector("button").focus(),t[n]},e.prototype.openFocusedMenu=function(){var e=this.getFocusedMenu();e&&de.element(e).controller("mdMenu").open()},e.prototype.getMenus=function(){var e=this.$element;return this.$mdUtil.nodesToArray(e[0].children).filter(function(e){return"MD-MENU"==e.nodeName})},e.prototype.getFocusedMenu=function(){return this.getMenus()[this.getFocusedMenuIndex()]},e.prototype.getFocusedMenuIndex=function(){var e=this.$mdUtil.getClosest(this.$document[0].activeElement,"MD-MENU");return e?this.getMenus().indexOf(e):-1},e.prototype.getOpenMenuIndex=function(){for(var e=this.getMenus(),t=0;t<e.length;++t)if(e[t].classList.contains("md-open"))return t;return-1},e.prototype.handleParentClick=function(e){var t=this.querySelector("md-menu.md-open");t&&!t.contains(e.target)&&de.element(t).controller("mdMenu").close(!0,{closeAll:!0})}}(),function(){function e(n,i){return{restrict:"E",require:"mdMenuBar",controller:"MenuBarController",compile:function(e,t){return t.ariaRole||e[0].setAttribute("role","menubar"),de.forEach(e[0].children,function(e){if("MD-MENU"==e.nodeName){e.hasAttribute("md-position-mode")||(e.setAttribute("md-position-mode","left bottom"),e.querySelector("button, a, md-button").setAttribute("role","menuitem"));var t=n.nodesToArray(e.querySelectorAll("md-menu-content"));de.forEach(t,function(e){e.classList.add("md-menu-bar-menu"),e.classList.add("md-dense"),e.hasAttribute("width")||e.setAttribute("width",5)})}}),e.find("md-menu-item").addClass("md-in-menu-bar"),function(e,t,n,o){t.addClass("_md"),i(e,t),o.init()}}}}e.$inject=["$mdUtil","$mdTheming"],de.module("material.components.menuBar").directive("mdMenuBar",e)}(),de.module("material.components.menuBar").directive("mdMenuDivider",function(){return{restrict:"E",compile:function(e,t){t.role||e[0].setAttribute("role","separator")}}}),function(){function e(e,t,n){this.$element=t,this.$attrs=n,this.$scope=e}e.$inject=["$scope","$element","$attrs"],de.module("material.components.menuBar").controller("MenuItemController",e),e.prototype.init=function(e){var t=this.$element,n=this.$attrs;this.ngModel=e,"checkbox"!=n.type&&"radio"!=n.type||(this.mode=n.type,this.iconEl=t[0].children[0],this.buttonEl=t[0].children[1],e&&this.initClickListeners())},e.prototype.clearNgAria=function(){var t=this.$element[0];de.forEach(["role","tabindex","aria-invalid","aria-checked"],function(e){t.removeAttribute(e)})},e.prototype.initClickListeners=function(){var e=this,t=this.ngModel,n=this.$scope,o=this.$attrs,i=(this.$element,this.mode);this.handleClick=de.bind(this,this.handleClick);var r=this.iconEl,a=de.element(this.buttonEl),d=this.handleClick;function s(e){e?a.off("click",d):a.on("click",d)}o.$observe("disabled",s),s(o.disabled),t.$render=function(){e.clearNgAria(),!function(){{if("radio"==i){var e=o.ngValue?n.$eval(o.ngValue):o.value;return t.$modelValue==e}return t.$modelValue}}()?(r.style.display="none",a.attr("aria-checked","false")):(r.style.display="",a.attr("aria-checked","true"))},n.$$postDigest(t.$render)},e.prototype.handleClick=function(e){var t,n=this.mode,o=this.ngModel,i=this.$attrs;"checkbox"==n?t=!o.$modelValue:"radio"==n&&(t=i.ngValue?this.$scope.$eval(i.ngValue):i.value),o.$setViewValue(t),o.$render()}}(),function(){function e(c,e,m){return{controller:"MenuItemController",require:["mdMenuItem","?ngModel"],priority:e.BEFORE_NG_ARIA,compile:function(o,e){var t,n,i=e.type,r="md-in-menu-bar";if("checkbox"!=i&&"radio"!=i||!o.hasClass(r))l("role","menuitem",o[0].querySelector("md-button, button, a"));else{var a=o[0].textContent,d=de.element('<md-button type="button"></md-button>'),s='<md-icon md-svg-src="'+m.mdChecked+'"></md-icon>';d.html(a),d.attr("tabindex","0"),o.html(""),o.append(de.element(s)),o.append(d),o.addClass("md-indent").removeClass(r),l("role","checkbox"==i?"menuitemcheckbox":"menuitemradio",d),t="ng-disabled",n=c.prefixer(t),de.forEach(n,function(e){if(o[0].hasAttribute(e)){var t=o[0].getAttribute(e);d[0].setAttribute(e,t),o[0].removeAttribute(e)}})}return function(e,t,n,o){var i=o[0],r=o[1];i.init(r)};function l(e,t,n){(n=n||o)instanceof de.element&&(n=n[0]),n.hasAttribute(e)||n.setAttribute(e,t)}}}}e.$inject=["$mdUtil","$mdConstant","$$mdSvgRegistry"],de.module("material.components.menuBar").directive("mdMenuItem",e)}(),function(){function e(i,t,r,a,d,o,e,n,s){var l,c,m=d.prefixer(),u=this;this.nestLevel=parseInt(t.mdNestLevel,10)||0,this.init=function(e,t){t=t||{},l=e,(c=r[0].querySelector(m.buildSelector(["ng-click","ng-mouseenter"]))).setAttribute("aria-expanded","false"),this.isInMenuBar=t.isInMenuBar,this.nestedMenus=d.nodesToArray(l[0].querySelectorAll(".md-nested-menu")),l.on("$mdInterimElementRemove",function(){u.isOpen=!1,d.nextTick(function(){u.onIsOpenChanged(u.isOpen)})}),d.nextTick(function(){u.onIsOpenChanged(u.isOpen)});var n="menu_container_"+d.nextUid();l.attr("id",n),de.element(c).attr({"aria-owns":n,"aria-haspopup":"true"}),a.$on("$destroy",de.bind(this,function(){this.disableHoverListener(),i.destroy()})),l.on("$destroy",function(){i.destroy()})};var p,h,f=[];this.enableHoverListener=function(){f.push(e.$on("$mdMenuOpen",function(e,t){l[0].contains(t[0])&&(u.currentlyOpenMenu=t.controller("mdMenu"),u.isAlreadyOpening=!1,u.currentlyOpenMenu.registerContainerProxy(u.triggerContainerProxy.bind(u)))})),f.push(e.$on("$mdMenuClose",function(e,t){l[0].contains(t[0])&&(u.currentlyOpenMenu=se)})),(h=de.element(d.nodesToArray(l[0].children[0].children))).on("mouseenter",u.handleMenuItemHover),h.on("mouseleave",u.handleMenuItemMouseLeave)},this.disableHoverListener=function(){for(;f.length;)f.shift()();h&&h.off("mouseenter",u.handleMenuItemHover),h&&h.off("mouseleave",u.handleMenuItemMouseLeave)},this.handleMenuItemHover=function(e){if(!u.isAlreadyOpening){var t=e.target.querySelector("md-menu")||d.getClosest(e.target,"MD-MENU");p=o(function(){if(t&&(t=de.element(t).controller("mdMenu")),u.currentlyOpenMenu&&u.currentlyOpenMenu!=t){var e=u.nestLevel+1;u.currentlyOpenMenu.close(!0,{closeTo:e}),u.isAlreadyOpening=!!t,t&&t.open()}else t&&!t.isOpen&&t.open&&(u.isAlreadyOpening=!!t,t&&t.open())},t?100:250);var n=e.currentTarget.querySelector(".md-button:not([disabled])");n&&n.focus()}},this.handleMenuItemMouseLeave=function(){p&&(o.cancel(p),p=se)},this.open=function(e){e&&e.stopPropagation(),e&&e.preventDefault(),u.isOpen||(u.enableHoverListener(),u.isOpen=!0,d.nextTick(function(){u.onIsOpenChanged(u.isOpen)}),(c=c||(e?e.target:r[0])).setAttribute("aria-expanded","true"),a.$emit("$mdMenuOpen",r),i.show({scope:a,mdMenuCtrl:u,nestLevel:u.nestLevel,element:l,target:c,preserveElement:!0,parent:"body"}).finally(function(){c.setAttribute("aria-expanded","false"),u.disableHoverListener()}))},this.onIsOpenChanged=function(e){e?(l.attr("aria-hidden","false"),r[0].classList.add("md-open"),de.forEach(u.nestedMenus,function(e){e.classList.remove("md-open")})):(l.attr("aria-hidden","true"),r[0].classList.remove("md-open")),a.$mdMenuIsOpen=u.isOpen},this.focusMenuContainer=function(){var e=l[0].querySelector(m.buildSelector(["md-menu-focus-target","md-autofocus"]));e||(e=l[0].querySelector(".md-button:not([disabled])")),e.focus()},this.registerContainerProxy=function(e){this.containerProxy=e},this.triggerContainerProxy=function(e){this.containerProxy&&this.containerProxy(e)},this.destroy=function(){return u.isOpen?i.destroy():n.when(!1)},this.close=function(e,t){if(u.isOpen){u.isOpen=!1,d.nextTick(function(){u.onIsOpenChanged(u.isOpen)});var n=de.extend({},t,{skipFocus:e});if(a.$emit("$mdMenuClose",r,n),i.hide(null,t),!e){var o=u.restoreFocusTo||r.find("button")[0];o instanceof de.element&&(o=o[0]),o&&o.focus()}}},this.positionMode=function(){var e=(t.mdPositionMode||"target").split(" ");return 1===e.length&&e.push(e[0]),{left:e[0],top:e[1]}},this.offsets=function(){var e=(t.mdOffset||"0 0").split(" ").map(parseFloat);if(2===e.length)return{left:e[0],top:e[1]};if(1===e.length)return{top:e[0],left:e[0]};throw Error("Invalid offsets specified. Please follow format <x, y> or <n>")},a.$mdMenu={open:this.open,close:this.close},a.$mdOpenMenu=de.bind(this,function(){return s.warn("mdMenu: The $mdOpenMenu method is deprecated. Please use `$mdMenu.open`."),this.open.apply(this,arguments)})}e.$inject=["$mdMenu","$attrs","$element","$scope","$mdUtil","$timeout","$rootScope","$q","$log"],de.module("material.components.menu").controller("mdMenuCtrl",e)}(),function(){function e(a){var d="Invalid HTML for md-menu: ";return{restrict:"E",require:["mdMenu","?^mdMenuBar"],controller:"mdMenuCtrl",scope:!0,compile:function(e){e.addClass("md-menu");var t=e.children()[0],n=a.prefixer();n.hasAttribute(t,"ng-click")||(t=t.querySelector(n.buildSelector(["ng-click","ng-mouseenter"]))||t);var o="MD-BUTTON"===t.nodeName||"BUTTON"===t.nodeName;t&&o&&!t.hasAttribute("type")&&t.setAttribute("type","button");if(!t)throw Error(d+"Expected the menu to have a trigger element.");if(2!==e.children().length)throw Error(d+"Expected two children elements. The second element must have a `md-menu-content` element.");t&&t.setAttribute("aria-haspopup","true");var i=e[0].querySelectorAll("md-menu"),r=parseInt(e[0].getAttribute("md-nest-level"),10)||0;i&&de.forEach(a.nodesToArray(i),function(e){e.hasAttribute("md-position-mode")||e.setAttribute("md-position-mode","cascade"),e.classList.add("_md-nested-menu"),e.setAttribute("md-nest-level",r+1)});return s}};function s(e,t,n,o){var i=o[0],r=!!o[1],a=de.element('<div class="_md md-open-menu-container md-whiteframe-z2"></div>'),d=t.children()[1];t.addClass("_md"),d.hasAttribute("role")||d.setAttribute("role","menu"),a.append(d),t.on("$destroy",function(){a.remove()}),t.append(a),a[0].style.display="none",i.init(a,{isInMenuBar:r})}}e.$inject=["$mdUtil"],de.module("material.components.menu").directive("mdMenu",e)}(),function(){function e(e){t.$inject=["$mdUtil","$mdTheming","$mdConstant","$document","$window","$q","$$rAF","$animateCss","$animate","$log"];var w=8;return e("$mdMenu").setDefaults({methods:["target"],options:t});function t(C,l,c,M,T,m,u,p,h,f){var A=C.prefixer(),g=C.dom.animator;return{parent:"body",onShow:function(a,n,d){(function(){if(!d.target)throw Error("$mdMenu.show() expected a target to animate from in options.target");de.extend(d,{alreadyOpen:!1,isRemoved:!1,target:de.element(d.target),parent:de.element(d.parent),menuContentEl:de.element(n[0].querySelector("md-menu-content"))})})(),d.menuContentEl[0]?l.inherit(d.menuContentEl,d.target):f.warn("$mdMenu: Menu elements should always contain a `md-menu-content` element,otherwise interactivity features will not work properly.",n);return d.cleanupResizing=(o=n,i=d,r=u.throttle(function(){if(!d.isRemoved){var e=v(o,i);o.css(g.toCss(e))}}),T.addEventListener("resize",r),T.addEventListener("orientationchange",r),function(){T.removeEventListener("resize",r),T.removeEventListener("orientationchange",r)}),d.hideBackdrop=(e=a,t=d,t.nestLevel?de.noop:(t.disableParentScroll&&!C.getClosest(t.target,"MD-DIALOG")?t.restoreScroll=C.disableScrollAround(t.element,t.parent):t.disableParentScroll=!1,t.hasBackdrop&&(t.backdrop=C.createBackdrop(e,"md-menu-backdrop md-click-catcher"),h.enter(t.backdrop,M[0].body)),function(){t.backdrop&&t.backdrop.remove(),t.disableParentScroll&&t.restoreScroll()})),(d.parent.append(n),n[0].style.display="",m(function(e){var t=v(n,d);n.removeClass("md-leave"),p(n,{addClass:"md-active",from:g.toCss(t),to:g.toCss({transform:""})}).start().then(e)})).then(function(e){return d.alreadyOpen=!0,d.cleanupInteraction=function(){if(!d.menuContentEl[0])return de.noop;d.menuContentEl.on("keydown",i),d.menuContentEl[0].addEventListener("click",r,!0);var e=d.menuContentEl[0].querySelector(A.buildSelector(["md-menu-focus-target","md-autofocus"]));if(!e)for(var t=d.menuContentEl[0].children.length,n=0;n<t;n++){var o=d.menuContentEl[0].children[n];if(e=o.querySelector(".md-button:not([disabled])"))break;if(o.firstElementChild&&!o.firstElementChild.disabled){e=o.firstElementChild;break}}return e&&e.focus(),function(){d.menuContentEl.off("keydown",i),d.menuContentEl[0].removeEventListener("click",r,!0)};function i(e){var t;switch(e.keyCode){case c.KEY_CODE.ESCAPE:d.mdMenuCtrl.close(!1,{closeAll:!0}),t=!0;break;case c.KEY_CODE.TAB:d.mdMenuCtrl.close(!1,{closeAll:!0}),t=!1;break;case c.KEY_CODE.UP_ARROW:b(e,d.menuContentEl,d,-1)||d.nestLevel||d.mdMenuCtrl.triggerContainerProxy(e),t=!0;break;case c.KEY_CODE.DOWN_ARROW:b(e,d.menuContentEl,d,1)||d.nestLevel||d.mdMenuCtrl.triggerContainerProxy(e),t=!0;break;case c.KEY_CODE.LEFT_ARROW:d.nestLevel?d.mdMenuCtrl.close():d.mdMenuCtrl.triggerContainerProxy(e),t=!0;break;case c.KEY_CODE.RIGHT_ARROW:var n=C.getClosest(e.target,"MD-MENU");n&&n!=d.parent[0]?e.target.click():d.mdMenuCtrl.triggerContainerProxy(e),t=!0}t&&(e.preventDefault(),e.stopImmediatePropagation())}function r(e){var t=e.target;do{if(t==d.menuContentEl[0])return;if((o(t,["ng-click","ng-href","ui-sref"])||"BUTTON"==t.nodeName||"MD-BUTTON"==t.nodeName)&&!o(t,["md-prevent-menu-close"])){var n=C.getClosest(t,"MD-MENU");t.hasAttribute("disabled")||n&&n!=d.parent[0]||a.$apply(function(){d.mdMenuCtrl.close(!0,{closeAll:!0})});break}}while(t=t.parentNode);function o(e,t){if(!e)return!1;for(var n,o=0;n=t[o];++o)if(A.hasAttribute(e,n))return!0;return!1}}}(),d.cleanupBackdrop=d.backdrop?(d.backdrop.on("click",s),function(){d.backdrop.off("click",s)}):de.noop,n.addClass("md-clickable"),e});var e,t;var o,i,r;function s(e){e.preventDefault(),e.stopPropagation(),a.$apply(function(){d.mdMenuCtrl.close(!0,{closeAll:!0})})}},onRemove:function(e,n,o){return o.cleanupInteraction(),o.cleanupBackdrop(),o.cleanupResizing(),o.hideBackdrop(),n.removeClass("md-clickable"),!0===o.$destroy?t():p(n,{addClass:"md-leave"}).start().then(t);function t(){var e,t;n.removeClass("md-active"),e=n,(t=o).preserveElement?i(e).style.display="none":i(e).parentNode===i(t.parent)&&i(t.parent).removeChild(i(e)),o.alreadyOpen=!1}},hasBackdrop:!0,disableParentScroll:!0,skipCompile:!0,preserveScope:!0,multiple:!0,themable:!0};function b(e,t,n,o){for(var i,r=C.getClosest(e.target,"MD-MENU-ITEM"),a=C.nodesToArray(t[0].children),d=a.indexOf(r)+o;0<=d&&d<a.length;d+=o){if(i=s(a[d].querySelector(".md-button")))break}return i}function s(e){if(e&&-1!=e.getAttribute("tabindex"))return e.focus(),M[0].activeElement==e}function v(e,t){var n,o=e[0],i=e[0].firstElementChild,r=i.getBoundingClientRect(),a=M[0].body.getBoundingClientRect(),d=T.getComputedStyle(i),s=t.target[0].querySelector(A.buildSelector("md-menu-origin"))||t.target[0],l=s.getBoundingClientRect(),c={left:a.left+w,top:Math.max(a.top,0)+w,bottom:Math.max(a.bottom,Math.max(a.top,0)+a.height)-w,right:a.right-w},m={top:0,left:0,right:0,bottom:0},u={top:0,left:0,right:0,bottom:0},p=t.mdMenuCtrl.positionMode();"target"!==p.top&&"target"!==p.left&&"target-right"!==p.left||(n=function(){for(var e=0;e<i.children.length;++e)if("none"!=T.getComputedStyle(i.children[e]).display)return i.children[e]}())&&(m=(n=(n=n.firstElementChild||n).querySelector(A.buildSelector("md-menu-align-target"))||n).getBoundingClientRect(),u={top:parseFloat(o.style.top||0),left:parseFloat(o.style.left||0)});var h={},f="top ";switch(p.top){case"target":h.top=u.top+l.top-m.top;break;case"cascade":h.top=l.top-parseFloat(d.paddingTop)-s.style.top;break;case"bottom":h.top=l.top+l.height;break;default:throw new Error('Invalid target mode "'+p.top+'" specified for md-menu on Y axis.')}var g="rtl"===C.bidi();switch(p.left){case"target":h.left=u.left+l.left-m.left,f+=g?"right":"left";break;case"target-left":h.left=l.left,f+="left";break;case"target-right":h.left=l.right-r.width+(r.right-m.right),f+="right";break;case"cascade":var b=g?l.left-r.width<c.left:l.right+r.width<c.right;h.left=b?l.right-s.style.left:l.left-s.style.left-r.width,f+=b?"left":"right";break;case"right":g?(h.left=l.right-l.width,f+="left"):(h.left=l.right-r.width,f+="right");break;case"left":g?(h.left=l.right-r.width,f+="right"):(h.left=l.left,f+="left");break;default:throw new Error('Invalid target mode "'+p.left+'" specified for md-menu on X axis.')}var v,E=t.mdMenuCtrl.offsets();h.top+=E.top,h.left+=E.left,(v=h).top=Math.max(Math.min(v.top,c.bottom-o.offsetHeight),c.top),v.left=Math.max(Math.min(v.left,c.right-o.offsetWidth),c.left);var $=Math.round(100*Math.min(l.width/o.offsetWidth,1))/100,y=Math.round(100*Math.min(l.height/o.offsetHeight,1))/100;return{top:Math.round(h.top),left:Math.round(h.left),transform:t.alreadyOpen?se:C.supplant("scale({0},{1})",[$,y]),transformOrigin:f}}}function i(e){return e instanceof de.element&&(e=e[0]),e}}e.$inject=["$$interimElementProvider"],de.module("material.components.menu").provider("$mdMenu",e)}(),function(){function e($,y,u,C,p,e){var M=$.requestAnimationFrame||$.webkitRequestAnimationFrame||de.noop,h=$.cancelAnimationFrame||$.webkitCancelAnimationFrame||$.webkitCancelRequestAnimationFrame||de.noop,f="determinate",T="indeterminate",A="_md-progress-circular-disabled",w="md-mode-indeterminate";return{restrict:"E",scope:{value:"@",mdDiameter:"@",mdMode:"@"},template:'<svg xmlns="http://www.w3.org/2000/svg"><path fill="none"/></svg>',compile:function(e,t){if(e.attr({"aria-valuemin":0,"aria-valuemax":100,role:"progressbar"}),de.isUndefined(t.mdMode)){var n=t.hasOwnProperty("value")?f:T;t.$set("mdMode",n)}else t.$set("mdMode",t.mdMode.trim());return o}};function o(g,a,r){var b,e,t=a[0],d=de.element(t.querySelector("svg")),v=de.element(t.querySelector("path")),n=y.startIndeterminate,o=y.endIndeterminate,i=0,E=0;function s(n,e,t,o,i,r){var a=++E,d=C.now(),s=e-n,l=N(g.mdDiameter),c=S(l),m=t||y.easeFn,u=o||y.duration,p=-90*(i||0),h=r||100;function f(e){v.attr("stroke-dashoffset",k(l,c,e,h)),v.attr("transform","rotate("+p+" "+l/2+" "+l/2+")")}e===n?f(e):b=M(function e(){var t=$.Math.max(0,$.Math.min(C.now()-d,u));f(m(t,n,s,u)),a===E&&t<u&&(b=M(e))})}function l(){s(n,o,y.easeFnIndeterminate,y.durationIndeterminate,i,75),i=++i%4}function c(){e||(e=p(l,y.durationIndeterminate,0,!1),l(),a.addClass(w).removeAttr("aria-valuenow"))}function m(){e&&(p.cancel(e),e=null,a.removeClass(w))}u(a),a.toggleClass(A,r.hasOwnProperty("disabled")),g.mdMode===T&&c(),g.$on("$destroy",function(){m(),b&&h(b)}),g.$watchGroup(["value","mdMode",function(){var e=t.disabled;return!0===e||!1===e?e:de.isDefined(a.attr("disabled"))}],function(e,t){var n=e[1],o=e[2];if(o!==t[2]&&a.toggleClass(A,!!o),o)m();else if(n!==f&&n!==T&&(n=T,r.$set("mdMode",n)),n===T)c();else{var i=x(e[0]);m(),a.attr("aria-valuenow",i),s(x(t[0]),i)}}),g.$watch("mdDiameter",function(e){var t=N(e),n=S(t),o=x(g.value),i=t/2+"px",r={width:t+"px",height:t+"px"};d[0].setAttribute("viewBox","0 0 "+t+" "+t),d.css(r).css("transform-origin",i+" "+i+" "+i),a.css(r),v.attr("stroke-width",n),v.attr("stroke-linecap","square"),g.mdMode==T?(v.attr("d",_(t,n,!0)),v.attr("stroke-dasharray",(t-n)*$.Math.PI*.75),v.attr("stroke-dashoffset",k(t,n,1,75))):(v.attr("d",_(t,n,!1)),v.attr("stroke-dasharray",(t-n)*$.Math.PI),v.attr("stroke-dashoffset",k(t,n,0,100)),s(o,o))})}function _(e,t,n){var o=e/2,i=t/2,r=o+","+i,a=o-i;return"M"+r+"A"+a+","+a+" 0 1 1 "+(i+","+o)+(n?"":"A"+a+","+a+" 0 0 1 "+r)}function k(e,t,n,o){return(e-t)*$.Math.PI*(3*(o||100)/100-n/100)}function x(e){return $.Math.max(0,$.Math.min(e||0,100))}function N(e){var t=y.progressSize;if(e){var n=parseFloat(e);return e.lastIndexOf("%")===e.length-1&&(n=n/100*t),n}return t}function S(e){return y.strokeWidth/100*e}}e.$inject=["$window","$mdProgressCircular","$mdTheming","$mdUtil","$interval","$log"],de.module("material.components.progressCircular").directive("mdProgressCircular",e)}(),de.module("material.components.progressCircular").provider("$mdProgressCircular",function(){var t={progressSize:50,strokeWidth:10,duration:100,easeFn:e,durationIndeterminate:1333,startIndeterminate:1,endIndeterminate:149,easeFnIndeterminate:n,easingPresets:{linearEase:e,materialEase:n}};return{configure:function(e){return t=de.extend(t,e||{})},$get:function(){return t}};function e(e,t,n,o){return n*e/o+t}function n(e,t,n,o){var i=(e/=o)*e,r=i*e;return t+n*(6*r*i+-15*i*i+10*r)}}),de.module("material.components.tabs").directive("mdTab",function(){return{require:"^?mdTabs",terminal:!0,compile:function(e,t){var n=s(e,"md-tab-label"),o=s(e,"md-tab-body");if(0===n.length&&(n=de.element("<md-tab-label></md-tab-label>"),t.label?n.text(t.label):n.append(e.contents()),0===o.length)){var i=e.contents().detach();(o=de.element("<md-tab-body></md-tab-body>")).append(i)}return e.append(n),o.html()&&e.append(o),r},scope:{active:"=?mdActive",disabled:"=?ngDisabled",select:"&?mdOnSelect",deselect:"&?mdOnDeselect",tabClass:"@mdTabClass"}};function r(e,t,n,o){if(o){var i=o.getTabElementIndex(t),r=s(t,"md-tab-body").remove(),a=s(t,"md-tab-label").remove(),d=o.insertTab({scope:e,parent:e.$parent,index:i,element:t,template:r.html(),label:a.html()},i);e.select=e.select||de.noop,e.deselect=e.deselect||de.noop,e.$watch("active",function(e){e&&o.select(d.getIndex(),!0)}),e.$watch("disabled",function(){o.refreshIndex()}),e.$watch(function(){return o.getTabElementIndex(t)},function(e){d.index=e,o.updateTabOrder()}),e.$on("$destroy",function(){o.removeTab(d)})}}function s(e,t){for(var n=e[0].children,o=0,i=n.length;o<i;o++){var r=n[o];if(r.tagName===t.toUpperCase())return de.element(r)}return de.element()}}),de.module("material.components.tabs").directive("mdTabItem",function(){return{require:"^?mdTabs",link:function(e,t,n,o){o&&o.attachRipple(e,t)}}}),de.module("material.components.tabs").directive("mdTabLabel",function(){return{terminal:!0}}),function(){function e(o){return{restrict:"A",compile:function(e,t){var n=o(t.mdTabScroll,null,!0);return function(t,e){e.on("mousewheel",function(e){t.$apply(function(){n(t,{$event:e})})})}}}}e.$inject=["$parse"],de.module("material.components.tabs").directive("mdTabScroll",e)}(),function(){function e(l,c,n,o,i,m,s,r,a,d,e,u,t){var p=this,h=!1,f=[],g=!1,b=!1;function v(t,e){var n=r.$normalize("md-"+t);function o(e){p[t]="false"!==e}e&&O(t,e),r.hasOwnProperty(n)&&o(r[n]),r.$observe(n,o)}function E(){g=!0,de.element(n).off("resize",x)}function $(){var e=D();de.element(e.wrapper).toggleClass("md-stretch-tabs",function(){switch(p.stretchTabs){case"always":return!0;case"never":return!1;default:return!p.shouldPaginate&&n.matchMedia("(max-width: 600px)").matches}}()),z()}function y(){p.shouldCenterTabs=I()}function C(t,e){if(t!==e){var n=D();de.forEach(n.tabs,function(e){e.style.maxWidth=t+"px"}),de.forEach(n.dummies,function(e){e.style.maxWidth=t+"px"}),m.nextTick(p.updateInkBarStyles)}}function M(e,t){e!==t&&(p.maxTabWidth=R(),p.shouldCenterTabs=I(),m.nextTick(function(){p.maxTabWidth=R(),j(p.selectedIndex)}))}function T(e){c[e?"removeClass":"addClass"]("md-no-tab-content")}function A(e){var t=D(),n=(p.shouldCenterTabs||V()?"":"-")+e+"px";n=n.replace("--",""),de.element(t.paging).css(o.CSS.TRANSFORM,"translate("+n+", 0)"),l.$broadcast("$mdTabsPaginationChanged")}function w(e,t){e!==t&&D().tabs[e]&&(j(),B())}function _(e,t){e!==t&&(p.selectedIndex=H(e),p.lastSelectedIndex=t,p.updateInkBarStyles(),q(),j(e),l.$broadcast("$mdTabsChanged"),p.tabs[t]&&p.tabs[t].scope.deselect(),p.tabs[e]&&p.tabs[e].scope.select())}function k(e,t){h||(p.focusIndex=p.selectedIndex=e),t&&p.noSelectClick||m.nextTick(function(){p.tabs[e].element.triggerHandler("click")},!1)}function x(){p.lastSelectedIndex=p.selectedIndex,p.offsetLeft=W(p.offsetLeft),m.nextTick(function(){p.updateInkBarStyles(),P()})}function N(e){de.element(D().inkBar).toggleClass("ng-hide",e)}function S(e){c.toggleClass("md-dynamic-height",e)}function D(){var e={},t=c[0];return e.wrapper=t.querySelector("md-tabs-wrapper"),e.canvas=e.wrapper.querySelector("md-tabs-canvas"),e.paging=e.canvas.querySelector("md-pagination-wrapper"),e.inkBar=e.paging.querySelector("md-ink-bar"),e.nextButton=t.querySelector("md-next-button"),e.prevButton=t.querySelector("md-prev-button"),e.contents=t.querySelectorAll("md-tabs-content-wrapper > md-tab-content"),e.tabs=e.paging.querySelectorAll("md-tab-item"),e.dummies=e.canvas.querySelectorAll("md-dummy-tab"),e}function I(){return p.centerTabs&&!p.shouldPaginate}function H(e){if(-1===e)return-1;var t,n,o=Math.max(p.tabs.length-e,e);for(t=0;t<=o;t++){if((n=p.tabs[e+t])&&!0!==n.scope.disabled)return n.getIndex();if((n=p.tabs[e-t])&&!0!==n.scope.disabled)return n.getIndex()}return e}function O(e,n,o){Object.defineProperty(p,e,{get:function(){return o},set:function(e){var t=o;o=e,n&&n(e,t)}})}function P(){p.maxTabWidth=R(),p.shouldPaginate=function(){var e;if(p.noPagination||!b)return!1;var t=c.prop("clientWidth");return de.forEach(D().tabs,function(e){t-=e.offsetWidth}),e=t<0,D().paging.style.width=e?"999999px":se,e}()}function L(e){var t=0;return de.forEach(e,function(e){t+=Math.max(e.offsetWidth,e.getBoundingClientRect().width)}),Math.ceil(t)}function R(){var e=D().canvas.clientWidth;return Math.max(0,Math.min(e-1,264))}function F(e,t){var n,o=t?"focusIndex":"selectedIndex",i=p[o];for(n=i+e;p.tabs[n]&&p.tabs[n].scope.disabled;n+=e);n=(i+e+p.tabs.length)%p.tabs.length,p.tabs[n]&&(p[o]=n)}function B(){p.styleTabItemFocus="keyboard"===e.getLastInteractionType(),D().tabs[p.focusIndex].focus()}function j(e){var t=D();if(de.isNumber(e)||(e=p.focusIndex),t.tabs[e]&&!p.shouldCenterTabs){var n=t.tabs[e],o=n.offsetLeft,i=n.offsetWidth+o;if(0!==e)if(V()){var r=L(Array.prototype.slice.call(t.tabs,0,e)),a=L(Array.prototype.slice.call(t.tabs,0,e+1));p.offsetLeft=Math.min(p.offsetLeft,W(r)),p.offsetLeft=Math.max(p.offsetLeft,W(a-t.canvas.clientWidth))}else p.offsetLeft=Math.max(p.offsetLeft,W(i-t.canvas.clientWidth+32)),p.offsetLeft=Math.min(p.offsetLeft,W(o));else p.offsetLeft=0}}function U(){p.selectedIndex=H(p.selectedIndex),p.focusIndex=H(p.focusIndex)}function q(){if(!p.dynamicHeight)return c.css("height","");if(!p.tabs.length)return f.push(q);var e=D(),t=e.contents[p.selectedIndex],n=t?t.offsetHeight:0,o=e.wrapper.offsetHeight,i=n+o,r=c.prop("clientHeight");if(r!==i){"bottom"===c.attr("md-align-tabs")&&(r-=o,i-=o,c.attr("md-border-bottom")!==se&&++r),h=!0;var a={height:r+"px"},d={height:i+"px"};c.css(a),s(c,{from:a,to:d,easing:"cubic-bezier(0.35, 0, 0.25, 1)",duration:.5}).start().done(function(){c.css({transition:"none",height:""}),m.nextTick(function(){c.css("transition","")}),h=!1})}}function z(e,t){if(!p.noInkBar){var n=D();if(n.tabs[p.selectedIndex])if(p.tabs.length)if(c.prop("offsetParent")){var o=p.selectedIndex,i=n.paging.offsetWidth,r=n.tabs[o],a=r.offsetLeft,d=i-a-r.offsetWidth;if(p.shouldCenterTabs){var s=L(n.tabs);s<i&&e!==i&&t!==s&&u(z,0,!0,i,s)}!function(){var e=D(),t=p.selectedIndex,n=p.lastSelectedIndex,o=de.element(e.inkBar);if(!de.isNumber(n))return;o.toggleClass("md-left",t<n).toggleClass("md-right",n<t)}(),de.element(n.inkBar).css({left:a+"px",right:d+"px"})}else(function e(){e.watcher||(e.watcher=l.$watch(function(){m.nextTick(function(){e.watcher&&c.prop("offsetParent")&&(e.watcher(),e.watcher=null,x())},!1)}))})();else f.push(p.updateInkBarStyles);else de.element(n.inkBar).css({left:"auto",right:"auto"})}}function W(e){var t=D();if(!t.tabs.length||!p.shouldPaginate)return 0;var n=t.tabs[t.tabs.length-1],o=n.offsetLeft+n.offsetWidth;return V()?(e=Math.min(t.paging.offsetWidth-t.canvas.clientWidth,e),e=Math.max(0,e)):(e=Math.max(0,e),e=Math.min(o-t.canvas.clientWidth,e)),e}function V(){return"rtl"===m.bidi()}p.$onInit=function(){(function(t,e){var n=r.$normalize("md-"+t);e&&O(t,e);r.$observe(n,function(e){p[t]=e})})("stretchTabs",$),O("focusIndex",w,p.selectedIndex||0),O("offsetLeft",A,0),O("hasContent",T,!1),O("maxTabWidth",C,R()),O("shouldPaginate",M,!1),v("noInkBar",N),v("dynamicHeight",S),v("noPagination"),v("swipeContent"),v("noDisconnect"),v("autoselect"),v("noSelectClick"),v("centerTabs",y),v("enableDisconnect"),p.scope=l,p.parent=l.$parent,p.tabs=[],p.lastSelectedIndex=null,p.hasFocus=!1,p.styleTabItemFocus=!1,p.shouldCenterTabs=I(),p.tabContentPrefix="tab-content-",p.navigationHint="Use the left and right arrow keys to navigate between tabs",p.selectedIndex=p.selectedIndex||0,e=r.$mdTabsTemplate,t=de.element(c[0].querySelector("md-tab-data")),t.html(e),a(t.contents())(p.parent),delete r.$mdTabsTemplate,l.$watch("$mdTabsCtrl.selectedIndex",_),de.element(n).on("resize",x),l.$on("$destroy",E),d(c),m.nextTick(function(){q(),j(),z(),p.tabs[p.selectedIndex]&&p.tabs[p.selectedIndex].scope.select(),b=!0,P()});var e,t},p.updatePagination=m.debounce(P,100),p.redirectFocus=B,p.attachRipple=function(e,t){var n=D(),o={colorElement:de.element(n.inkBar)};i.attach(e,t,o)},p.insertTab=function(e,t){var n=b,o={getIndex:function(){return p.tabs.indexOf(i)},isActive:function(){return this.getIndex()===p.selectedIndex},isLeft:function(){return this.getIndex()<p.selectedIndex},isRight:function(){return this.getIndex()>p.selectedIndex},shouldRender:function(){return!p.noDisconnect||this.isActive()},hasFocus:function(){return p.styleTabItemFocus&&p.hasFocus&&this.getIndex()===p.focusIndex},id:m.nextUid(),hasContent:!(!e.template||!e.template.trim())},i=de.extend(o,e);de.isDefined(t)?p.tabs.splice(t,0,i):p.tabs.push(i);return f.forEach(function(e){m.nextTick(e)}),f=[],function(){var e,t=!1;for(e=0;e<p.tabs.length;e++)if(p.tabs[e].hasContent){t=!0;break}p.hasContent=t}(),m.nextTick(function(){P(),function(e){if(e.hasContent){var t=c[0].querySelectorAll('[md-tab-id="'+e.id+'"]');de.element(t).attr("aria-controls",p.tabContentPrefix+e.id)}}(i),n&&p.autoselect&&m.nextTick(function(){m.nextTick(function(){k(p.tabs.indexOf(i))})})}),i},p.removeTab=function(e){if(g)return;var t=p.selectedIndex,n=p.tabs.splice(e.getIndex(),1)[0];U(),p.selectedIndex===t&&(n.scope.deselect(),p.tabs[p.selectedIndex]&&p.tabs[p.selectedIndex].scope.select());m.nextTick(function(){P(),p.offsetLeft=W(p.offsetLeft)})},p.select=k,p.scroll=function(e){if(!p.shouldPaginate)return;e.preventDefault(),p.offsetLeft=W(p.offsetLeft-e.wheelDelta)},p.nextPage=function(){if(!p.canPageForward())return;var e=t.increasePageOffset(D(),p.offsetLeft);p.offsetLeft=W(e)},p.previousPage=function(){if(!p.canPageBack())return;var e=t.decreasePageOffset(D(),p.offsetLeft);p.offsetLeft=W(e)},p.keydown=function(e){switch(e.keyCode){case o.KEY_CODE.LEFT_ARROW:e.preventDefault(),F(-1,!0);break;case o.KEY_CODE.RIGHT_ARROW:e.preventDefault(),F(1,!0);break;case o.KEY_CODE.SPACE:case o.KEY_CODE.ENTER:e.preventDefault(),h||k(p.focusIndex);break;case o.KEY_CODE.TAB:p.focusIndex!==p.selectedIndex&&(p.focusIndex=p.selectedIndex)}},p.canPageForward=function(){var e=D(),t=e.tabs[e.tabs.length-1];if(V())return p.offsetLeft<e.paging.offsetWidth-e.canvas.offsetWidth;return t&&t.offsetLeft+t.offsetWidth>e.canvas.clientWidth+p.offsetLeft},p.canPageBack=function(){return 0<p.offsetLeft},p.refreshIndex=U,p.incrementIndex=F,p.getTabElementIndex=function(e){var t=c[0].getElementsByTagName("md-tab");return Array.prototype.indexOf.call(t,e[0])},p.updateInkBarStyles=m.debounce(z,100),p.updateTabOrder=m.debounce(function(){var e=p.tabs[p.selectedIndex],t=p.tabs[p.focusIndex];p.tabs=p.tabs.sort(function(e,t){return e.index-t.index}
10510),p.selectedIndex=p.tabs.indexOf(e),p.focusIndex=p.tabs.indexOf(t)},100),p.getFocusedTabId=function(){var e=p.tabs[p.focusIndex];if(!e||!e.id)return null;return"tab-item-"+e.id},1===de.version.major&&de.version.minor<=4&&this.$onInit()}e.$inject=["$scope","$element","$window","$mdConstant","$mdTabInkRipple","$mdUtil","$animateCss","$attrs","$compile","$mdTheming","$mdInteraction","$timeout","MdTabsPaginationService"],de.module("material.components.tabs").controller("MdTabsController",e)}(),function(){function e(n){return{scope:{navigationHint:"@?mdNavigationHint",selectedIndex:"=?mdSelected"},template:function(e,t){return t.$mdTabsTemplate=e.html(),'<md-tabs-wrapper> <md-tab-data></md-tab-data> <md-prev-button tabindex="-1" role="button" aria-label="Previous Page" aria-disabled="{{!$mdTabsCtrl.canPageBack()}}" ng-class="{ \'md-disabled\': !$mdTabsCtrl.canPageBack() }" ng-if="$mdTabsCtrl.shouldPaginate" ng-click="$mdTabsCtrl.previousPage()"> <md-icon md-svg-src="'+n.mdTabsArrow+'"></md-icon> </md-prev-button> <md-next-button tabindex="-1" role="button" aria-label="Next Page" aria-disabled="{{!$mdTabsCtrl.canPageForward()}}" ng-class="{ \'md-disabled\': !$mdTabsCtrl.canPageForward() }" ng-if="$mdTabsCtrl.shouldPaginate" ng-click="$mdTabsCtrl.nextPage()"> <md-icon md-svg-src="'+n.mdTabsArrow+'"></md-icon> </md-next-button> <md-tabs-canvas tabindex="{{ $mdTabsCtrl.hasFocus ? -1 : 0 }}" ng-focus="$mdTabsCtrl.redirectFocus()" ng-class="{ \'md-paginated\': $mdTabsCtrl.shouldPaginate, \'md-center-tabs\': $mdTabsCtrl.shouldCenterTabs }" ng-keydown="$mdTabsCtrl.keydown($event)"> <md-pagination-wrapper ng-class="{ \'md-center-tabs\': $mdTabsCtrl.shouldCenterTabs }" md-tab-scroll="$mdTabsCtrl.scroll($event)" role="tablist" aria-label="{{::$mdTabsCtrl.navigationHint}}"><md-tab-item tabindex="{{ tab.isActive() ? 0 : -1 }}" class="md-tab {{::tab.scope.tabClass}}" ng-repeat="tab in $mdTabsCtrl.tabs" role="tab" id="tab-item-{{::tab.id}}" md-tab-id="{{::tab.id}}" aria-selected="{{tab.isActive()}}" aria-disabled="{{tab.scope.disabled || \'false\'}}" ng-click="$mdTabsCtrl.select(tab.getIndex())" ng-focus="$mdTabsCtrl.hasFocus = true" ng-blur="$mdTabsCtrl.hasFocus = false" ng-class="{ \'md-active\': tab.isActive(), \'md-focused\': tab.hasFocus(), \'md-disabled\': tab.scope.disabled }" ng-disabled="tab.scope.disabled" md-swipe-left="$mdTabsCtrl.nextPage()" md-swipe-right="$mdTabsCtrl.previousPage()" md-tabs-template="::tab.label" md-scope="::tab.parent"></md-tab-item> <md-ink-bar></md-ink-bar> </md-pagination-wrapper> <md-tabs-dummy-wrapper aria-hidden="true" class="md-visually-hidden md-dummy-wrapper"> <md-dummy-tab class="md-tab" tabindex="-1" ng-focus="$mdTabsCtrl.hasFocus = true" ng-blur="$mdTabsCtrl.hasFocus = false" ng-repeat="tab in $mdTabsCtrl.tabs" md-tabs-template="::tab.label" md-scope="::tab.parent"></md-dummy-tab> </md-tabs-dummy-wrapper> </md-tabs-canvas> </md-tabs-wrapper> <md-tabs-content-wrapper ng-show="$mdTabsCtrl.hasContent && $mdTabsCtrl.selectedIndex >= 0" class="_md"> <md-tab-content id="{{:: $mdTabsCtrl.tabContentPrefix + tab.id}}" class="_md" role="tabpanel" aria-labelledby="tab-item-{{::tab.id}}" md-swipe-left="$mdTabsCtrl.swipeContent && $mdTabsCtrl.incrementIndex(1)" md-swipe-right="$mdTabsCtrl.swipeContent && $mdTabsCtrl.incrementIndex(-1)" ng-if="tab.hasContent" ng-repeat="(index, tab) in $mdTabsCtrl.tabs" ng-class="{ \'md-no-transition\': $mdTabsCtrl.lastSelectedIndex == null, \'md-active\': tab.isActive(), \'md-left\': tab.isLeft(), \'md-right\': tab.isRight(), \'md-no-scroll\': $mdTabsCtrl.dynamicHeight }"> <div md-tabs-template="::tab.template" md-connected-if="tab.isActive()" md-scope="::tab.parent" ng-if="$mdTabsCtrl.enableDisconnect || tab.shouldRender()"></div> </md-tab-content> </md-tabs-content-wrapper>'},controller:"MdTabsController",controllerAs:"$mdTabsCtrl",bindToController:!0}}e.$inject=["$$mdSvgRegistry"],de.module("material.components.tabs").directive("mdTabs",e)}(),function(){function e(s,l){return{require:"^?mdTabs",link:function(e,t,n,o){if(o){var i,r,a=function(){o.updatePagination(),o.updateInkBarStyles()};if("MutationObserver"in l){(i=new MutationObserver(a)).observe(t[0],{childList:!0,subtree:!0,characterData:!0}
vendor: 10,244 bytes, line 10510
10510),r=i.disconnect.bind(i)}else{var d=s.debounce(a,15,null,!1);t.on("DOMSubtreeModified",d),r=t.off.bind(t,"DOMSubtreeModified",d)}e.$on("$destroy",function(){r()})}}}}e.$inject=["$mdUtil","$window"],de.module("material.components.tabs").directive("mdTabsDummyWrapper",e)}(),function(){function e(a,d){return{restrict:"A",link:function(e,t,n,o){if(!o)return;var i=o.enableDisconnect?e.compileScope.$new():e.compileScope;return t.html(e.template),a(t.contents())(i),d.nextTick(function(){e.$watch("connected",function(e){!1===e?o.enableDisconnect&&d.disconnectScope(i):r()}),e.$on("$destroy",r)});function r(){o.enableDisconnect&&d.reconnectScope(i)}},scope:{template:"=mdTabsTemplate",connected:"=?mdConnectedIf",compileScope:"=mdScope"},require:"^?mdTabs"}}e.$inject=["$compile","$mdUtil"],de.module("material.components.tabs").directive("mdTabsTemplate",e)}(),de.module("material.core").constant("$MD_THEME_CSS",'md-autocomplete.md-THEME_NAME-theme{background:"{{background-hue-1}}"}md-autocomplete.md-THEME_NAME-theme[disabled]:not([md-floating-label]){background:"{{background-hue-2}}"}md-autocomplete.md-THEME_NAME-theme button md-icon path{fill:"{{background-600}}"}md-autocomplete.md-THEME_NAME-theme button:after{background:"{{background-600-0.3}}"}md-autocomplete.md-THEME_NAME-theme input{color:"{{foreground-1}}"}md-autocomplete.md-THEME_NAME-theme.md-accent md-input-container.md-input-focused .md-input{border-color:"{{accent-color}}"}md-autocomplete.md-THEME_NAME-theme.md-accent md-input-container.md-input-focused label,md-autocomplete.md-THEME_NAME-theme.md-accent md-input-container.md-input-focused md-icon{color:"{{accent-color}}"}md-autocomplete.md-THEME_NAME-theme.md-accent md-progress-linear .md-container{background-color:"{{accent-100}}"}md-autocomplete.md-THEME_NAME-theme.md-accent md-progress-linear .md-bar{background-color:"{{accent-color}}"}md-autocomplete.md-THEME_NAME-theme.md-warn md-input-container.md-input-focused .md-input{border-color:"{{warn-A700}}"}md-autocomplete.md-THEME_NAME-theme.md-warn md-input-container.md-input-focused label,md-autocomplete.md-THEME_NAME-theme.md-warn md-input-container.md-input-focused md-icon{color:"{{warn-A700}}"}md-autocomplete.md-THEME_NAME-theme.md-warn md-progress-linear .md-container{background-color:"{{warn-100}}"}md-autocomplete.md-THEME_NAME-theme.md-warn md-progress-linear .md-bar{background-color:"{{warn-color}}"}.md-autocomplete-suggestions-container.md-THEME_NAME-theme{background:"{{background-hue-1}}"}.md-autocomplete-suggestions-container.md-THEME_NAME-theme li{color:"{{foreground-1}}"}.md-autocomplete-suggestions-container.md-THEME_NAME-theme li.selected,.md-autocomplete-suggestions-container.md-THEME_NAME-theme li:hover{background:"{{background-500-0.18}}"}md-backdrop{background-color:"{{background-900-0.0}}"}md-backdrop.md-opaque.md-THEME_NAME-theme{background-color:"{{background-900-1.0}}"}md-bottom-sheet.md-THEME_NAME-theme{background-color:"{{background-color}}";border-top-color:"{{background-hue-3}}"}md-bottom-sheet.md-THEME_NAME-theme.md-list md-list-item{color:"{{foreground-1}}"}md-bottom-sheet.md-THEME_NAME-theme .md-subheader{background-color:"{{background-color}}";color:"{{foreground-1}}"}.md-button.md-THEME_NAME-theme:not([disabled]).md-focused,.md-button.md-THEME_NAME-theme:not([disabled]):hover{background-color:"{{background-500-0.2}}"}.md-button.md-THEME_NAME-theme:not([disabled]).md-icon-button:hover{background-color:transparent}.md-button.md-THEME_NAME-theme.md-fab md-icon{color:"{{accent-contrast}}"}.md-button.md-THEME_NAME-theme.md-primary{color:"{{primary-color}}"}.md-button.md-THEME_NAME-theme.md-primary.md-fab,.md-button.md-THEME_NAME-theme.md-primary.md-raised{color:"{{primary-contrast}}";background-color:"{{primary-color}}"}.md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]) md-icon,.md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]) md-icon{color:"{{primary-contrast}}"}.md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]).md-focused,.md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]):hover,.md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]).md-focused,.md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]):hover{background-color:"{{primary-600}}"}.md-button.md-THEME_NAME-theme.md-primary:not([disabled]) md-icon{color:"{{primary-color}}"}.md-button.md-THEME_NAME-theme.md-fab{background-color:"{{accent-color}}";color:"{{accent-contrast}}"}.md-button.md-THEME_NAME-theme.md-fab:not([disabled]) .md-icon{color:"{{accent-contrast}}"}.md-button.md-THEME_NAME-theme.md-fab:not([disabled]).md-focused,.md-button.md-THEME_NAME-theme.md-fab:not([disabled]):hover{background-color:"{{accent-A700}}"}.md-button.md-THEME_NAME-theme.md-raised{color:"{{background-900}}";background-color:"{{background-50}}"}.md-button.md-THEME_NAME-theme.md-raised:not([disabled]) md-icon{color:"{{background-900}}"}.md-button.md-THEME_NAME-theme.md-raised:not([disabled]):hover{background-color:"{{background-50}}"}.md-button.md-THEME_NAME-theme.md-raised:not([disabled]).md-focused{background-color:"{{background-200}}"}.md-button.md-THEME_NAME-theme.md-warn{color:"{{warn-color}}"}.md-button.md-THEME_NAME-theme.md-warn.md-fab,.md-button.md-THEME_NAME-theme.md-warn.md-raised{color:"{{warn-contrast}}";background-color:"{{warn-color}}"}.md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]) md-icon,.md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]) md-icon{color:"{{warn-contrast}}"}.md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]).md-focused,.md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]):hover,.md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]).md-focused,.md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]):hover{background-color:"{{warn-600}}"}.md-button.md-THEME_NAME-theme.md-warn:not([disabled]) md-icon{color:"{{warn-color}}"}.md-button.md-THEME_NAME-theme.md-accent{color:"{{accent-color}}"}.md-button.md-THEME_NAME-theme.md-accent.md-fab,.md-button.md-THEME_NAME-theme.md-accent.md-raised{color:"{{accent-contrast}}";background-color:"{{accent-color}}"}.md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]) md-icon,.md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]) md-icon{color:"{{accent-contrast}}"}.md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]).md-focused,.md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]):hover,.md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]).md-focused,.md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]):hover{background-color:"{{accent-A700}}"}.md-button.md-THEME_NAME-theme.md-accent:not([disabled]) md-icon{color:"{{accent-color}}"}.md-button.md-THEME_NAME-theme.md-accent[disabled],.md-button.md-THEME_NAME-theme.md-fab[disabled],.md-button.md-THEME_NAME-theme.md-raised[disabled],.md-button.md-THEME_NAME-theme.md-warn[disabled],.md-button.md-THEME_NAME-theme[disabled]{color:"{{foreground-3}}";cursor:default}.md-button.md-THEME_NAME-theme.md-accent[disabled] md-icon,.md-button.md-THEME_NAME-theme.md-fab[disabled] md-icon,.md-button.md-THEME_NAME-theme.md-raised[disabled] md-icon,.md-button.md-THEME_NAME-theme.md-warn[disabled] md-icon,.md-button.md-THEME_NAME-theme[disabled] md-icon{color:"{{foreground-3}}"}.md-button.md-THEME_NAME-theme.md-fab[disabled],.md-button.md-THEME_NAME-theme.md-raised[disabled]{background-color:"{{foreground-4}}"}.md-button.md-THEME_NAME-theme[disabled]{background-color:transparent}._md a.md-THEME_NAME-theme:not(.md-button).md-primary{color:"{{primary-color}}"}._md a.md-THEME_NAME-theme:not(.md-button).md-primary:hover{color:"{{primary-700}}"}._md a.md-THEME_NAME-theme:not(.md-button).md-accent{color:"{{accent-color}}"}._md a.md-THEME_NAME-theme:not(.md-button).md-accent:hover{color:"{{accent-A700}}"}._md a.md-THEME_NAME-theme:not(.md-button).md-warn{color:"{{warn-color}}"}._md a.md-THEME_NAME-theme:not(.md-button).md-warn:hover{color:"{{warn-700}}"}md-card.md-THEME_NAME-theme{color:"{{foreground-1}}";background-color:"{{background-hue-1}}";border-radius:2px}md-card.md-THEME_NAME-theme .md-card-image{border-radius:2px 2px 0 0}md-card.md-THEME_NAME-theme md-card-header md-card-avatar md-icon{color:"{{background-color}}";background-color:"{{foreground-3}}"}md-card.md-THEME_NAME-theme md-card-header md-card-header-text .md-subhead,md-card.md-THEME_NAME-theme md-card-title md-card-title-text:not(:only-child) .md-subhead{color:"{{foreground-2}}"}md-checkbox.md-THEME_NAME-theme .md-ripple{color:"{{accent-A700}}"}md-checkbox.md-THEME_NAME-theme.md-checked .md-ripple{color:"{{background-600}}"}md-checkbox.md-THEME_NAME-theme.md-checked.md-focused .md-container:before{background-color:"{{accent-color-0.26}}"}md-checkbox.md-THEME_NAME-theme .md-ink-ripple{color:"{{foreground-2}}"}md-checkbox.md-THEME_NAME-theme.md-checked .md-ink-ripple{color:"{{accent-color-0.87}}"}md-checkbox.md-THEME_NAME-theme:not(.md-checked) .md-icon{border-color:"{{foreground-2}}"}md-checkbox.md-THEME_NAME-theme.md-checked .md-icon{background-color:"{{accent-color-0.87}}"}md-checkbox.md-THEME_NAME-theme.md-checked .md-icon:after{border-color:"{{accent-contrast-0.87}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary .md-ripple{color:"{{primary-600}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ripple{color:"{{background-600}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary .md-ink-ripple{color:"{{foreground-2}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ink-ripple{color:"{{primary-color-0.87}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary:not(.md-checked) .md-icon{border-color:"{{foreground-2}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-icon{background-color:"{{primary-color-0.87}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked.md-focused .md-container:before{background-color:"{{primary-color-0.26}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-icon:after{border-color:"{{primary-contrast-0.87}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary .md-indeterminate[disabled] .md-container{c
10510olor:"{{foreground-3}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn .md-ripple{color:"{{warn-600}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn .md-ink-ripple{color:"{{foreground-2}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-ink-ripple{color:"{{warn-color-0.87}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn:not(.md-checked) .md-icon{border-color:"{{foreground-2}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-icon{background-color:"{{warn-color-0.87}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked.md-focused:not([disabled]) .md-container:before{background-color:"{{warn-color-0.26}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-icon:after{border-color:"{{background-200}}"}md-checkbox.md-THEME_NAME-theme[disabled]:not(.md-checked) .md-icon{border-color:"{{foreground-3}}"}md-checkbox.md-THEME_NAME-theme[disabled].md-checked .md-icon{background-color:"{{foreground-3}}"}md-checkbox.md-THEME_NAME-theme[disabled].md-checked .md-icon:after{border-color:"{{background-200}}"}md-checkbox.md-THEME_NAME-theme[disabled] .md-icon:after{border-color:"{{foreground-3}}"}md-checkbox.md-THEME_NAME-theme[disabled] .md-label{color:"{{foreground-3}}"}md-chips.md-THEME_NAME-theme .md-chips{box-shadow:0 1px "{{foreground-4}}"}md-chips.md-THEME_NAME-theme .md-chips.md-focused{box-shadow:0 2px "{{primary-color}}"}md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input{color:"{{foreground-1}}"}md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input:-moz-placeholder,md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input::-moz-placeholder{color:"{{foreground-3}}"}md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input:-ms-input-placeholder{color:"{{foreground-3}}"}md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input::-webkit-input-placeholder{color:"{{foreground-3}}"}md-chips.md-THEME_NAME-theme md-chip{background:"{{background-300}}";color:"{{background-800}}"}md-chips.md-THEME_NAME-theme md-chip md-icon{color:"{{background-700}}"}md-chips.md-THEME_NAME-theme md-chip.md-focused{background:"{{primary-color}}";color:"{{primary-contrast}}"}md-chips.md-THEME_NAME-theme md-chip.md-focused md-icon{color:"{{primary-contrast}}"}md-chips.md-THEME_NAME-theme md-chip._md-chip-editing{background:transparent;color:"{{background-800}}"}md-chips.md-THEME_NAME-theme md-chip-remove .md-button md-icon path{fill:"{{background-500}}"}.md-contact-suggestion span.md-contact-email{color:"{{background-400}}"}md-content.md-THEME_NAME-theme{color:"{{foreground-1}}";background-color:"{{background-default}}"}.md-THEME_NAME-theme .md-calendar{background:"{{background-hue-1}}";color:"{{foreground-1-0.87}}"}.md-THEME_NAME-theme .md-calendar tr:last-child td{border-bottom-color:"{{background-hue-2}}"}.md-THEME_NAME-theme .md-calendar-day-header{background:"{{background-500-0.32}}";color:"{{foreground-1-0.87}}"}.md-THEME_NAME-theme .md-calendar-date.md-calendar-date-today .md-calendar-date-selection-indicator{border:1px solid "{{primary-500}}"}.md-THEME_NAME-theme .md-calendar-date.md-calendar-date-today.md-calendar-date-disabled{color:"{{primary-500-0.6}}"}.md-calendar-date.md-focus .md-THEME_NAME-theme .md-calendar-date-selection-indicator,.md-THEME_NAME-theme .md-calendar-date-selection-indicator:hover{background:"{{background-500-0.32}}"}.md-THEME_NAME-theme .md-calendar-date.md-calendar-selected-date .md-calendar-date-selection-indicator,.md-THEME_NAME-theme .md-calendar-date.md-focus.md-calendar-selected-date .md-calendar-date-selection-indicator{background:"{{primary-500}}";color:"{{primary-500-contrast}}";border-color:transparent}.md-THEME_NAME-theme .md-calendar-date-disabled,.md-THEME_NAME-theme .md-calendar-month-label-disabled{color:"{{foreground-3}}"}.md-THEME_NAME-theme .md-calendar-month-label md-icon,.md-THEME_NAME-theme .md-datepicker-input{color:"{{foreground-1}}"}.md-THEME_NAME-theme .md-datepicker-input:-moz-placeholder,.md-THEME_NAME-theme .md-datepicker-input::-moz-placeholder{color:"{{foreground-3}}"}.md-THEME_NAME-theme .md-datepicker-input:-ms-input-placeholder{color:"{{foreground-3}}"}.md-THEME_NAME-theme .md-datepicker-input::-webkit-input-placeholder{color:"{{foreground-3}}"}.md-THEME_NAME-theme .md-datepicker-input-container{border-bottom-color:"{{foreground-4}}"}.md-THEME_NAME-theme .md-datepicker-input-container.md-datepicker-focused{border-bottom-color:"{{primary-color}}"}.md-accent .md-THEME_NAME-theme .md-datepicker-input-container.md-datepicker-focused{border-bottom-color:"{{accent-color}}"}.md-THEME_NAME-theme .md-datepicker-input-container.md-datepicker-invalid,.md-warn .md-THEME_NAME-theme .md-datepicker-input-container.md-datepicker-focused{border-bottom-color:"{{warn-A700}}"}.md-THEME_NAME-theme .md-datepicker-calendar-pane{border-color:"{{background-hue-1}}"}.md-THEME_NAME-theme .md-datepicker-triangle-button .md-datepicker-expand-triangle{border-top-color:"{{foreground-2}}"}.md-THEME_NAME-theme .md-datepicker-open .md-datepicker-calendar-icon{color:"{{primary-color}}"}.md-accent .md-THEME_NAME-theme .md-datepicker-open .md-datepicker-calendar-icon,.md-THEME_NAME-theme .md-datepicker-open.md-accent .md-datepicker-calendar-icon{color:"{{accent-color}}"}.md-THEME_NAME-theme .md-datepicker-open.md-warn .md-datepicker-calendar-icon,.md-warn .md-THEME_NAME-theme .md-datepicker-open .md-datepicker-calendar-icon{color:"{{warn-A700}}"}.md-THEME_NAME-theme .md-datepicker-calendar{background:"{{background-hue-1}}"}.md-THEME_NAME-theme .md-datepicker-input-mask-opaque{box-shadow:0 0 0 9999px "{{background-hue-1}}"}.md-THEME_NAME-theme .md-datepicker-open .md-datepicker-input-container{background:"{{background-hue-1}}"}md-dialog.md-THEME_NAME-theme{border-radius:4px;background-color:"{{background-hue-1}}";color:"{{foreground-1}}"}md-dialog.md-THEME_NAME-theme.md-content-overflow .md-actions,md-dialog.md-THEME_NAME-theme.md-content-overflow md-dialog-actions,md-div
10510ider.md-THEME_NAME-theme{border-top-color:"{{foreground-4}}"}.layout-gt-lg-row>md-divider.md-THEME_NAME-theme,.layout-gt-md-row>md-divider.md-THEME_NAME-theme,.layout-gt-sm-row>md-divider.md-THEME_NAME-theme,.layout-gt-xs-row>md-divider.md-THEME_NAME-theme,.layout-lg-row>md-divider.md-THEME_NAME-theme,.layout-md-row>md-divider.md-THEME_NAME-theme,.layout-row>md-divider.md-THEME_NAME-theme,.layout-sm-row>md-divider.md-THEME_NAME-theme,.layout-xl-row>md-divider.md-THEME_NAME-theme,.layout-xs-row>md-divider.md-THEME_NAME-theme{border-right-color:"{{foreground-4}}"}md-icon.md-THEME_NAME-theme{color:"{{foreground-2}}"}md-icon.md-THEME_NAME-theme.md-primary{color:"{{primary-color}}"}md-icon.md-THEME_NAME-theme.md-accent{color:"{{accent-color}}"}md-icon.md-THEME_NAME-theme.md-warn{color:"{{warn-color}}"}md-input-container.md-THEME_NAME-theme .md-input{color:"{{foreground-1}}";border-color:"{{foreground-4}}"}md-input-container.md-THEME_NAME-theme .md-input:-moz-placeholder,md-input-container.md-THEME_NAME-theme .md-input::-moz-placeholder{color:"{{foreground-3}}"}md-input-container.md-THEME_NAME-theme .md-input:-ms-input-placeholder{color:"{{foreground-3}}"}md-input-container.md-THEME_NAME-theme .md-input::-webkit-input-placeholder{color:"{{foreground-3}}"}md-input-container.md-THEME_NAME-theme>md-icon{color:"{{foreground-1}}"}md-input-container.md-THEME_NAME-theme .md-placeholder,md-input-container.md-THEME_NAME-theme label{color:"{{foreground-3}}"}md-input-container.md-THEME_NAME-theme label.md-required:after{color:"{{warn-A700}}"}md-input-container.md-THEME_NAME-theme:not(.md-input-focused):not(.md-input-invalid) label.md-required:after{color:"{{foreground-2}}"}md-input-container.md-THEME_NAME-theme .md-input-message-animation,md-input-container.md-THEME_NAME-theme .md-input-messages-animation{color:"{{warn-A700}}"}md-input-container.md-THEME_NAME-theme .md-input-message-animation .md-char-counter,md-input-container.md-THEME_NAME-theme .md-input-messages-animation .md-char-counter{color:"{{foreground-1}}"}md-input-container.md-THEME_NAME-theme.md-input-focused .md-input:-moz-placeholder,md-input-container.md-THEME_NAME-theme.md-input-focused .md-input::-moz-placeholder{color:"{{foreground-2}}"}md-input-container.md-THEME_NAME-theme.md-input-focused .md-input:-ms-input-placeholder{color:"{{foreground-2}}"}md-input-container.md-THEME_NAME-theme.md-input-focused .md-input::-webkit-input-placeholder{color:"{{foreground-2}}"}md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-has-value label{color:"{{foreground-2}}"}md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused .md-input,md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-resized .md-input{border-color:"{{primary-color}}"}md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused label,md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused md-icon{color:"{{primary-color}}"}md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-accent .md-input{border-color:"{{accent-color}}"}md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-accent label,md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-accent md-icon{color:"{{accent-color}}"}md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-warn .md-input{border-color:"{{warn-A700}}"}md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-warn label,md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-warn md-icon{color:"{{warn-A700}}"}md-input-container.md-THEME_NAME-theme.md-input-invalid .md-input{border-color:"{{warn-A700}}"}md-input-container.md-THEME_NAME-theme.md-input-invalid .md-char-counter,md-input-container.md-THEME_NAME-theme.md-input-invalid .md-input-message-animation,md-input-container.md-THEME_NAME-theme.md-input-invalid label{color:"{{warn-A700}}"}[disabled] md-input-container.md-THEME_NAME-theme .md-input,md-input-container.md-THEME_NAME-theme .md-input[disabled]{border-bottom-color:transparent;color:"{{foreground-3}}";background-image:linear-gradient(90deg,"{{foreground-3}}" 0,"{{foreground-3}}" 33%,transparent 0);background-image:-ms-linear-gradient(left,transparent 0,"{{foreground-3}}" 100%)}md-list.md-THEME_NAME-theme md-list-item.md-2-line .md-list-item-text h3,md-list.md-THEME_NAME-theme md-list-item.md-2-line .md-list-item-text h4,md-list.md-THEME_NAME-theme md-list-item.md-3-line .md-list-item-text h3,md-list.md-THEME_NAME-theme md-list-item.md-3-line .md-list-item-text h4{color:"{{foreground-1}}"}md-list.md-THEME_NAME-theme md-list-item.md-2-line .md-list-item-text p,md-list.md-THEME_NAME-theme md-list-item.md-3-line .md-list-item-text p{color:"{{foreground-2}}"}
10510md-list.md-THEME_NAME-theme .md-proxy-focus.md-focused div.md-no-style{background-color:"{{background-100}}"}md-list.md-THEME_NAME-theme md-list-item .md-avatar-icon{background-color:"{{foreground-3}}";color:"{{background-color}}"}md-list.md-THEME_NAME-theme md-list-item>md-icon{color:"{{foreground-2}}"}md-list.md-THEME_NAME-theme md-list-item>md-icon.md-highlight{color:"{{primary-color}}"}md-list.md-THEME_NAME-theme md-list-item>md-icon.md-highlight.md-accent{color:"{{accent-color}}"}md-menu-bar.md-THEME_NAME-theme>button.md-button{color:"{{foreground-1}}";border-radius:2px}md-menu-bar.md-THEME_NAME-theme md-menu>button{color:"{{foreground-1}}"}md-menu-bar.md-THEME_NAME-theme md-menu.md-open>button,md-menu-bar.md-THEME_NAME-theme md-menu>button:focus{outline:none;background-color:"{{ background-500-0.18}}"}md-menu-bar.md-THEME_NAME-theme.md-open:not(.md-keyboard-mode) md-menu:hover>button{background-color:"{{ background-500-0.18}}"}md-menu-bar.md-THEME_NAME-theme:not(.md-keyboard-mode):not(.md-open) md-menu button:focus,md-menu-bar.md-THEME_NAME-theme:not(.md-keyboard-mode):not(.md-open) md-menu button:hover{background:transparent}md-menu-content.md-THEME_NAME-theme .md-menu>.md-button:after{color:"{{foreground-2}}"}md-menu-content.md-THEME_NAME-theme .md-menu.md-open>.md-button{background-color:"{{ background-500-0.18}}"}md-toolbar.md-THEME_NAME-theme.md-menu-toolbar{background-color:"{{background-hue-1}}";color:"{{foreground-1}}"}md-toolbar.md-THEME_NAME-theme.md-menu-toolbar md-toolbar-filler{background-color:"{{primary-color}}";color:"{{primary-contrast}}"}md-toolbar.md-THEME_NAME-theme.md-menu-toolbar md-toolbar-filler md-icon{color:"{{primary-contrast}}"}md-menu-content.md-THEME_NAME-theme{background-color:"{{background-hue-1}}"}md-menu-content.md-THEME_NAME-theme md-menu-item{color:"{{foreground-1}}"}md-menu-content.md-THEME_NAME-theme md-menu-item md-icon{color:"{{foreground-2}}"}md-menu-content.md-THEME_NAME-theme md-menu-item .md-button[disabled],md-menu-content.md-THEME_NAME-theme md-menu-item .md-button[disabled] md-icon{color:"{{foreground-3}}"}md-menu-content.md-THEME_NAME-theme md-menu-divider{background-color:"{{foreground-4}}"}md-nav-bar.md-THEME_NAME-theme .md-nav-bar{background-color:transparent;border-color:"{{foreground-4}}"}md-nav-bar.md-THEME_NAME-theme .md-button._md-nav-button.md-unselected{color:"{{foreground-2}}"}md-nav-bar.md-THEME_NAME-theme .md-button._md-nav-button[disabled]{color:"{{foreground-3}}"}md-nav-bar.md-THEME_NAME-theme md-nav-ink-bar{color:"{{accent-color}}";background:"{{accent-color}}"}md-nav-bar.md-THEME_NAME-theme.md-accent>.md-nav-bar{background-color:"{{accent-color}}"}md-nav-bar.md-THEME_NAME-theme.md-accent>.md-nav-bar .md-button._md-nav-button{color:"{{accent-A100}}"}md-nav-bar.md-THEME_NAME-theme.md-accent>.md-nav-bar .md-button._md-nav-button.md-active,md-nav-bar.md-THEME_NAME-theme.md-accent>.md-nav-bar .md-button._md-nav-button.md-focused{color:"{{accent-contrast}}"}md-nav-bar.md-THEME_NAME-theme.md-accent>.md-nav-bar .md-button._md-nav-button.md-focused{background:"{{accent-contrast-0.1}}"}md-nav-bar.md-THEME_NAME-theme.md-accent>.md-nav-bar md-nav-ink-bar{color:"{{primary-600-1}}";background:"{{primary-600-1}}"}md-nav-bar.md-THEME_NAME-theme.md-warn>.md-nav-bar{background-color:"{{warn-color}}"}md-nav-bar.md-THEME_NAME-theme.md-warn>.md-nav-bar .md-button._md-nav-button{color:"{{warn-100}}"}md-nav-bar.md-THEME_NAME-theme.md-warn>.md-nav-bar .md-button._md-nav-button.md-active,md-nav-bar.md-THEME_NAME-theme.md-warn>.md-nav-bar .md-button._md-nav-button.md-focused{color:"{{warn-contrast}}"}md-nav-bar.md-THEME_NAME-theme.md-warn>.md-nav-bar .md-button._md-nav-button.md-focused{background:"{{warn-contrast-0.1}}"}md-nav-bar.md-THEME_NAME-theme.md-primary>.md-nav-bar{background-color:"{{primary-color}}"}md-nav-bar.md-THEME_NAME-theme.md-primary>.md-nav-bar .md-button._md-nav-button{color:"{{primary-100}}"}md-nav-bar.md-THEME_NAME-theme.md-primary>.md-nav-bar .md-button._md-nav-button.md-active,md-nav-bar.md-THEME_NAME-theme.md-primary>.md-nav-bar .md-button._md-nav-button.md-focused{color:"{{primary-contrast}}"}md-nav-bar.md-THEME_NAME-theme.md-primary>.md-nav-bar .md-button._md-nav-button.md-focused{background:"{{primary-contrast-0.1}}"}md-toolbar>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar{background-color:"{{primary-color}}"}md-toolbar>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button{color:"{{primary-100}}"}md-toolbar>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button.md-active,md-toolbar>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button.md-focused{color:"{{primary-contrast}}"}md-toolbar>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button.md-focused{background:"{{primary-contrast-0.1}}"}md-toolbar.md-accent>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar{background-color:"{{accent-color}}"}md-toolbar.md-accent>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button{color:"{{accent-A100}}"}md-toolbar.md-accent>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button.md-active,md-toolbar.md-accent>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button.md-focused{color:"{{accent-contrast}}"}md-toolbar.md-accent>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button.md-focused{background:"{{accent-contrast-0.1}}"}md-toolbar.md-accent>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar md-nav-ink-bar{color:"{{primary-600-1}}";background:"{{primary-600-1}}"}md-toolbar.md-warn>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar{background-color:"{{warn-color}}"}md-toolbar.md-warn>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button{color:"{{warn-100}}"}md-toolbar.md-warn>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button.md-active,md-toolbar.md-warn>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button.md-focused{color:"{{warn-contrast}}"}md-toolbar.md-warn>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button.md-focused{background:"{{warn-contrast-0.1}}"}._md-panel-backdrop.md-THEME_NAME-theme{background-color:"{{background-900-1.0}}"}md-progress-circular.md-THEME_NAME-theme path{stroke:"{{primary-color}}"}md-progress-circular.md-THEME_NAME-theme.md-warn path{stroke:"{{warn-color}}"}md-progress-circular.md-THEME_NAME-theme.md-accent path{stroke:"{{accent-color}}"}md-radio-button.md-THEME_NAME-theme .md-off{border-color:"{{foreground-2}}"}md-radio-button.md-THEME_NAME-theme .md-on{background-color:"{{accent-color-0.87}}"}md-radio-button.md-THEME_NAME-theme.md-checked .md-off{border-color:"{{accent-color-0.87}}"}md-radio-button.md-THEME_NAME-theme.md-checked .md-ink-ripple{color:"{{accent-color-0.87}}"}md-radio-button.md-THEME_NAME-theme .md-container .md-ripple{color:"{{accent-A700}}"}md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-on,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary .md-on,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary .md-on,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary .md-on{background-color:"{{primary-color-0.87}}"}md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary.md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary .md-checked .md-off,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-off,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary.md-checked .md-off,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary .md-checked .md-off,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary .md-checked .md-off{border-color:"{{primary-color-0.87}}"}md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary.md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary .md-checked .md-ink-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ink-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary.md-checked .md-ink-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary .md-checked .md-ink-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary .md-checked .md-ink-ripple{color:"{{primary-color-0.87}}"}md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-container .md-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary .md-container .md-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary .md-container .md-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary .md-container .md-ripple{color:"{{primary-600}}"}md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-on,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn .md-on,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn .md-on,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn .md-on{background-color:"{{warn-color-0.87}}"}md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn.md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn .md-checked .md-off,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-off,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn.md-checked .md-off,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn .md-checked .md-off,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn .md-checked .md-off{border-color:"{{warn-color-0.87}}"}md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn.md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn .md-checked .md-ink-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-ink-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn.md-checked .md-ink-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn .md-checked .md-ink-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn .md-checked .md-ink-ripple{color:"{{warn-color-0.87}}"}md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-container .md-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn .md-container .md-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn .md-container .md-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn .md-container .md-ripple{color:"{{warn-600}}"}md-radio-button.md-THEME_NAME-theme[disabled],md-radio-group.md-THEME_NAME-theme[disabled]{color:"{{foreground-3}}"}md-radio-button.md-THEME_NAME-theme[disabled] .md-container .md-off,md-radio-button.md-THEME_NAME-theme[disabled] .md-container .md-on,md-radio-group.md-THEME_NAME-theme[disabled] .md-container .md-off,md-radio-group.md-THEME_NAME-theme[disabled] .md-container .md-on{border-color:"{{foreground-3}}"}md-radio-group.md-THEME_NAME-theme .md-checked .md-ink-ripple{color:"{{accent-color-0.26}}"}md-radio-group.md-THEME_NAME-theme .md-checked:not([disabled]).md-primary .md-ink-ripple,md-radio-group.md-THEME_NAME-theme.md-primary .md-checked:not([disabled]) .md-ink-ripple{color:"{{primary-color-0.26}}"}md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty) .md-checked .md-container:before{background-color:"{{accent-color-0.26}}"}md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty) .md-checked.md-primary .md-container:before,md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty).md-primary .md-checked .md-container:before{background-color:"{{primary-color-0.26}}"}md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty) .md-checked.md-warn .md-container:before,md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty).md-warn .md-checked .md-container:before{background-color:"{{warn-color-0.26}}"}md-progress-linear.md-THEME_NAME-theme .md-container{background-color:"{{primary-100}}"}md-progress-linear.md-THEME_NAME-theme .md-bar{background-color:"{{primary-color}}"}md-progress-linear.md-THEME_NAME-theme.md-warn .md-container{background-color:"{{warn-100}}"}md-progress-linear.md-THEME_NAME-theme.md-warn .md-bar{background-color:"{{warn-color}}"}md-progress-linear.md-THEME_NAME-theme.md-accent .md-container{background-color:"{{accent-100}}"}md-progress-linear.md-THEME_NAME-theme.md-accent .md-bar{background-color:"{{accent-color}}"}md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-primary .md-bar
105101{background-color:"{{primary-100}}"}md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-primary .md-dashed:before{background:radial-gradient("{{primary-100}}" 0,"{{primary-100}}" 16%,transparent 42%)}md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-warn .md-bar1{background-color:"{{warn-100}}"}md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-warn .md-dashed:before{background:radial-gradient("{{warn-100}}" 0,"{{warn-100}}" 16%,transparent 42%)}md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-accent .md-bar1{background-color:"{{accent-100}}"}md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-accent .md-dashed:before{background:radial-gradient("{{accent-100}}" 0,"{{accent-100}}" 16%,transparent 42%)}md-input-container md-select.md-THEME_NAME-theme .md-select-value span:first-child:after{color:"{{warn-A700}}"}md-input-container:not(.md-input-focused):not(.md-input-invalid) md-select.md-THEME_NAME-theme .md-select-value span:first-child:after{color:"{{foreground-3}}"}md-input-container.md-input-focused:not(.md-input-has-value) md-select.md-THEME_NAME-theme .md-select-value,md-input-container.md-input-focused:not(.md-input-has-value) md-select.md-THEME_NAME-theme .md-select-value.md-select-placeholder{color:"{{primary-color}}"}md-input-container.md-input-invalid md-select.md-THEME_NAME-theme .md-select-value{color:"{{warn-A700}}"!important;border-bottom-color:"{{warn-A700}}"!important}md-input-container.md-input-invalid md-select.md-THEME_NAME-theme.md-no-underline .md-select-value{border-bottom-color:transparent!important}md-input-container:not(.md-input-invalid).md-input-focused.md-accent .md-select-value{border-color:"{{accent-color}}"}md-input-container:not(.md-input-invalid).md-input-focused.md-accent .md-select-value span{color:"{{accent-color}}"}md-input-container:not(.md-input-invalid).md-input-focused.md-warn .md-select-value{border-color:"{{warn-A700}}"}md-input-container:not(.md-input-invalid).md-input-focused.md-warn .md-select-value span{color:"{{warn-A700}}"}md-select.md-THEME_NAME-theme[disabled] .md-select-value{border-bottom-color:transparent;background-image:linear-gradient(90deg,"{{foreground-3}}" 0,"{{foreground-3}}" 33%,transparent 0);background-image:-ms-linear-gradient(left,transparent 0,"{{foreground-3}}" 100%)}md-select.md-THEME_NAME-theme .md-select-value{border-bottom-color:"{{foreground-4}}"}md-select.md-THEME_NAME-theme .md-select-value.md-select-placeholder{color:"{{foreground-3}}"}md-select.md-THEME_NAME-theme .md-select-value span:first-child:after{color:"{{warn-A700}}"}md-select.md-THEME_NAME-theme.md-no-underline .md-select-value{border-bottom-color:transparent!important}md-select.md-THEME_NAME-theme.ng-invalid.ng-touched .md-select-value{color:"{{warn-A700}}"!important;border-bottom-color:"{{warn-A700}}"!important}md-select.md-THEME_NAME-theme.ng-invalid.ng-touched.md-no-underline .md-select-value{border-bottom-color:transparent!important}md-select.md-THEME_NAME-theme:not([disabled]):focus .md-select-value{border-bottom-color:"{{primary-color}}";color:"{{ foreground-1 }}"}md-select.md-THEME_NAME-theme:not([disabled]):focus .md-select-value.md-select-placeholder{color:"{{ foreground-1 }}"}md-select.md-THEME_NAME-theme:not([disabled]):focus.md-no-underline .md-select-value{border-bottom-color:transparent!important}md-select.md-THEME_NAME-theme:not([disabled]):focus.md-accent .md-select-value{border-bottom-color:"{{accent-color}}"}md-select.md-THEME_NAME-theme:not([disabled]):focus.md-warn .md-select-value{border-bottom-color:"{{warn-color}}"}md-select.md-THEME_NAME-theme[disabled] .md-select-icon,md-select.md-THEME_NAME-theme[disabled] .md-select-value,md-select.md-THEME_NAME-theme[disabled] .md-select-value.md-select-placeholder{color:"{{foreground-3}}"}md-select.md-THEME_NAME-theme .md-select-icon{color:"{{foreground-2}}"}md-select-menu.md-THEME_NAME-theme md-content{background-color:"{{background-hue-1}}"}md-select-menu.md-THEME_NAME-theme md-content md-optgroup{color:"{{foreground-2}}"}md-select-menu.md-THEME_NAME-theme md-content md-option{color:"{{foreground-1}}"}md-select-menu.md-THEME_NAME-theme md-content md-option[disabled] .md-text{color:"{{foreground-3}}"}md-select-menu.md-THEME_NAME-theme md-content md-option:not([disabled]):focus,md-select-menu.md-THEME_NAME-theme md-content md-option:not([disabled]):hover{background-color:"{{background-500-0.18}}"}md-select-menu.md-THEME_NAME-theme md-content md-option[selected]{color:"{{primary-500}}"}md-select-menu.md-THEME_NAME-theme md-content md-option[selected]:focus{color:"{{primary-600}}"}md-select-menu.md-THEME_NAME-theme md-content md-option[selected].md-accent{color:"{{accent-color}}"}md-select-menu.md-THEME_NAME-theme md-content md-option[selected].md-accent:focus{color:"{{accent-A700}}"}.md-checkbox-enabled.md-THEME_NAME-theme .md-ripple{color:"{{primary-600}}"}.md-checkbox-enabled.md-THEME_NAME-theme[selected] .md-ripple{color:"{{background-600}}"}.md-checkbox-enabled.md-THEME_NAME-theme .md-ink-ripple{color:"{{foreground-2}}"}.md-checkbox-enabled.md-THEME_NAME-theme[selected] .md-ink-ripple{color:"{{primary-color-0.87}}"}.md-checkbox-enabled.md-THEME_NAME-theme:not(.md-checked) .md-icon{border-color:"{{foreground-2}}"}.md-checkbox-enabled.md-THEME_NAME-theme[selected] .md-icon{background-color:"{{primary-color-0.87}}"}.md-checkbox-enabled.md-THEME_NAME-theme[selected].md-focused .md-container:before{background-color:"{{primary-color-0.26}}"}.md-checkbox-enabled.md-THEME_NAME-theme[selected] .md-icon:after{border-color:"{{primary-contrast-0.87}}"}.md-checkbox-enabled.md-THEME_NAME-theme .md-indeterminate[disabled] .md-container{c
10510olor:"{{foreground-3}}"}.md-checkbox-enabled.md-THEME_NAME-theme md-option .md-text{color:"{{foreground-1}}"}md-sidenav.md-THEME_NAME-theme,md-sidenav.md-THEME_NAME-theme md-content{background-color:"{{background-hue-1}}"}md-slider.md-THEME_NAME-theme .md-track{background-color:"{{foreground-3}}"}md-slider.md-THEME_NAME-theme .md-track-ticks{color:"{{background-contrast}}"}md-slider.md-THEME_NAME-theme .md-focus-ring{background-color:"{{accent-A200-0.2}}"}md-slider.md-THEME_NAME-theme .md-disabled-thumb{border-color:"{{background-color}}";background-color:"{{background-color}}"}md-slider.md-THEME_NAME-theme.md-min .md-thumb:after{background-color:"{{background-color}}";border-color:"{{foreground-3}}"}md-slider.md-THEME_NAME-theme.md-min .md-focus-ring{background-color:"{{foreground-3-0.38}}"}md-slider.md-THEME_NAME-theme.md-min[md-discrete] .md-thumb:after{background-color:"{{background-contrast}}";border-color:transparent}md-slider.md-THEME_NAME-theme.md-min[md-discrete] .md-sign{background-color:"{{background-400}}"}md-slider.md-THEME_NAME-theme.md-min[md-discrete] .md-sign:after{border-top-color:"{{background-400}}"}md-slider.md-THEME_NAME-theme.md-min[md-discrete][md-vertical] .md-sign:after{border-top-color:transparent;border-left-color:"{{background-400}}"}md-slider.md-THEME_NAME-theme .md-track.md-track-fill{background-color:"{{accent-color}}"}md-slider.md-THEME_NAME-theme .md-thumb:after{border-color:"{{accent-color}}";background-color:"{{accent-color}}"}md-slider.md-THEME_NAME-theme .md-sign{background-color:"{{accent-color}}"}md-slider.md-THEME_NAME-theme .md-sign:after{border-top-color:"{{accent-color}}"}md-slider.md-THEME_NAME-theme[md-vertical] .md-sign:after{border-top-color:transparent;border-left-color:"{{accent-color}}"}md-slider.md-THEME_NAME-theme .md-thumb-text{color:"{{accent-contrast}}"}md-slider.md-THEME_NAME-theme.md-warn .md-focus-ring{background-color:"{{warn-200-0.38}}"}md-slider.md-THEME_NAME-theme.md-warn .md-track.md-track-fill{background-color:"{{warn-color}}"}md-slider.md-THEME_NAME-theme.md-warn .md-thumb:after{border-color:"{{warn-color}}";background-color:"{{warn-color}}"}md-slider.md-THEME_NAME-theme.md-warn .md-sign{background-color:"{{warn-color}}"}md-slider.md-THEME_NAME-theme.md-warn .md-sign:after{border-top-color:"{{warn-color}}"}md-slider.md-THEME_NAME-theme.md-warn[md-vertical] .md-sign:after{border-top-color:transparent;border-left-color:"{{warn-color}}"}md-slider.md-THEME_NAME-theme.md-warn .md-thumb-text{color:"{{warn-contrast}}"}md-slider.md-THEME_NAME-theme.md-primary .md-focus-ring{background-color:"{{primary-200-0.38}}"}md-slider.md-THEME_NAME-theme.md-primary .md-track.md-track-fill{background-color:"{{primary-color}}"}md-slider.md-THEME_NAME-theme.md-primary .md-thumb:after{border-color:"{{primary-color}}";background-color:"{{primary-color}}"}md-slider.md-THEME_NAME-theme.md-primary .md-sign{background-color:"{{primary-color}}"}md-slider.md-THEME_NAME-theme.md-primary .md-sign:after{border-top-color:"{{primary-color}}"}md-slider.md-THEME_NAME-theme.md-primary[md-vertical] .md-sign:after{border-top-color:transparent;border-left-color:"{{primary-color}}"}md-slider.md-THEME_NAME-theme.md-primary .md-thumb-text{color:"{{primary-contrast}}"}md-slider.md-THEME_NAME-theme[disabled] .md-thumb:after{border-color:transparent}md-slider.md-THEME_NAME-theme[disabled]:not(.md-min) .md-thumb:after,md-slider.md-THEME_NAME-theme[disabled][md-discrete] .md-thumb:after{background-color:"{{foreground-3}}";border-color:transparent}md-slider.md-THEME_NAME-theme[disabled][readonly] .md-sign{background-color:"{{background-400}}"}md-slider.md-THEME_NAME-theme[disabled][readonly] .md-sign:after{border-top-color:"{{background-400}}"}md-slider.md-THEME_NAME-theme[disabled][readonly][md-vertical] .md-sign:after{border-top-color:transparent;border-left-color:"{{background-400}}"}md-slider.md-THEME_NAME-theme[disabled][readonly] .md-disabled-thumb{border-color:transparent;background-color:transparent}md-slider-container[disabled]>:first-child:not(md-slider),md-slider-container[disabled]>:last-child:not(md-slider){color:"{{foreground-3}}"}.md-subheader.md-THEME_NAME-theme{color:"{{ foreground-2-0.23 }}";background-color:"{{background-default}}"}.md-subheader.md-THEME_NAME-theme.md-primary{color:"{{primary-color}}"}.md-subheader.md-THEME_NAME-theme.md-accent{color:"{{accent-color}}"}.md-subheader.md-THEME_NAME-theme.md-warn{color:"{{warn-color}}"}md-switch.md-THEME_NAME-theme .md-ink-ripple{color:"{{background-500}}"}md-switch.md-THEME_NAME-theme .md-thumb{background-color:"{{background-50}}"}md-switch.md-THEME_NAME-theme .md-bar{background-color:"{{background-500}}"}md-switch.md-THEME_NAME-theme.md-focused:not(.md-checked) .md-thumb:before,md-switch.md-THEME_NAME-theme.md-focused[disabled] .md-thumb:before{background-color:"{{foreground-4}}"}md-switch.md-THEME_NAME-theme.md-checked:not([disabled]) .md-ink-ripple{color:"{{accent-color}}"}md-switch.md-THEME_NAME-theme.md-checked:not([disabled]) .md-thumb{background-color:"{{accent-color}}"}md-switch.md-THEME_NAME-theme.md-checked:not([disabled]) .md-bar{background-color:"{{accent-color-0.5}}"}md-switch.md-THEME_NAME-theme.md-checked:not([disabled]).md-focused .md-thumb:before{background-color:"{{accent-color-0.26}}"}md-switch.md-THEME_NAME-theme.md-checked:not([disabled]).md-primary .md-ink-ripple{color:"{{primary-color}}"}md-switch.md-THEME_NAME-theme.md-checked:not([disabled]).md-primary .md-thumb{background-color:"{{primary-color}}"}md-switch.md-THEME_NAME-theme.md-checked:not([disabled]).md-primary .md-bar{background-color:"{{primary-color-0.5}}"}md-switch.md-THEME_NAME-theme.md-checked:not([disabled]).md-primary.md-focused .md-thumb:before{background-color:"{{primary-color-0.26}}"}md-switch.md-THEME_NAME-theme.md-checked:not([disabled]).md-warn .md-ink-ripple{color:"{{warn-color}}"}md-switch.md-THEME_NAME-theme.md-checked:not([disabled]).md-warn .md-thumb{background-color:"{{warn-color}}"}md-switch.md-THEME_NAME-theme.md-checked:not([disabled]).md-warn .md-bar{background-color:"{{warn-color-0.5}}"}md-switch.md-THEME_NAME-theme.md-checked:not([disabled]).md-warn.md-focused .md-thumb:before{background-color:"{{warn-color-0.26}}"}md-switch.md-THEME_NAME-theme[disabled] .md-thumb{background-color:"{{background-400}}"}md-switch.md-THEME_NAME-theme[disabled] .md-bar{background-color:"{{foreground-4}}"}md-tabs.md-THEME_NAME-theme md-tabs-wrapper{background-color:transparent;border-color:"{{foreground-4}}"}
10510md-tabs.md-THEME_NAME-theme .md-paginator md-icon{color:"{{primary-color}}"}md-tabs.md-THEME_NAME-theme md-ink-bar{color:"{{accent-color}}";background:"{{accent-color}}"}md-tabs.md-THEME_NAME-theme .md-tab{color:"{{foreground-2}}"}md-tabs.md-THEME_NAME-theme .md-tab[disabled],md-tabs.md-THEME_NAME-theme .md-tab[disabled] md-icon{color:"{{foreground-3}}"}md-tabs.md-THEME_NAME-theme .md-tab.md-active,md-tabs.md-THEME_NAME-theme .md-tab.md-active md-icon,md-tabs.md-THEME_NAME-theme .md-tab.md-focused,md-tabs.md-THEME_NAME-theme .md-tab.md-focused md-icon{color:"{{primary-color}}"}md-tabs.md-THEME_NAME-theme .md-tab.md-focused{background:"{{primary-color-0.1}}"}md-tabs.md-THEME_NAME-theme .md-tab .md-ripple-container{color:"{{accent-A100}}"}md-tabs.md-THEME_NAME-theme.md-accent>md-tabs-wrapper{background-color:"{{accent-color}}"}md-tabs.md-THEME_NAME-theme.md-accent>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]),md-tabs.md-THEME_NAME-theme.md-accent>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]) md-icon{color:"{{accent-A100}}"}md-tabs.md-THEME_NAME-theme.md-accent>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active,md-tabs.md-THEME_NAME-theme.md-accent>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active md-icon,md-tabs.md-THEME_NAME-theme.md-accent>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused,md-tabs.md-THEME_NAME-theme.md-accent>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused md-icon{color:"{{accent-contrast}}"}md-tabs.md-THEME_NAME-theme.md-accent>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused{background:"{{accent-contrast-0.1}}"}md-tabs.md-THEME_NAME-theme.md-accent>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-ink-bar{color:"{{primary-600-1}}";background:"{{primary-600-1}}"}md-tabs.md-THEME_NAME-theme.md-primary>md-tabs-wrapper{background-color:"{{primary-color}}"}md-tabs.md-THEME_NAME-theme.md-primary>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]),md-tabs.md-THEME_NAME-theme.md-primary>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]) md-icon{color:"{{primary-100}}"}md-tabs.md-THEME_NAME-theme.md-primary>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active,md-tabs.md-THEME_NAME-theme.md-primary>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active md-icon,md-tabs.md-THEME_NAME-theme.md-primary>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused,md-tabs.md-THEME_NAME-theme.md-primary>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused md-icon{color:"{{primary-contrast}}"}md-tabs.md-THEME_NAME-theme.md-primary>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused{background:"{{primary-contrast-0.1}}"}md-tabs.md-THEME_NAME-theme.md-warn>md-tabs-wrapper{background-color:"{{warn-color}}"}md-tabs.md-THEME_NAME-theme.md-warn>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]),md-tabs.md-THEME_NAME-theme.md-warn>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]) md-icon{color:"{{warn-100}}"}md-tabs.md-THEME_NAME-theme.md-warn>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active,md-tabs.md-THEME_NAME-theme.md-warn>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active md-icon,md-tabs.md-THEME_NAME-theme.md-warn>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused,md-tabs.md-THEME_NAME-theme.md-warn>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused md-icon{color:"{{warn-contrast}}"}md-tabs.md-THEME_NAME-theme.md-warn>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused{background:"{{warn-contrast-0.1}}"}md-toolbar>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper{background-color:"{{primary-color}}"}md-toolbar>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]),md-toolbar>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]) md-icon{color:"{{primary-100}}"}md-toolbar>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active,md-toolbar>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active md-icon,md-toolbar>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused,md-toolbar>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused md-icon{color:"{{primary-contrast}}"}md-toolbar>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused{background:"{{primary-contrast-0.1}}"}md-toolbar.md-accent>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper{background-color:"{{accent-color}}"}md-toolbar.md-accent>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]),md-toolbar.md-accent>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]) md-icon{color:"{{accent-A100}}"}md-toolbar.md-accent>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active,md-toolbar.md-accent>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active md-icon,md-toolbar.md-accent>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused,md-toolbar.md-accent>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused md-icon{color:"{{accent-contrast}}"}md-toolbar.md-accent>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused{background:"{{accent-contrast-0.1}}"}md-toolbar.md-accent>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-ink-bar{color:"{{primary-600-1}}";background:"{{primary-600-1}}"}md-toolbar.md-warn>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper{background-color:"{{warn-color}}"}md-toolbar.md-warn>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]),md-toolbar.md-warn>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]) md-icon{color:"{{warn-100}}"}md-toolbar.md-warn>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active,md-toolbar.md-warn>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active md-icon,md-toolbar.md-warn>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused,md-toolbar.md-warn>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused md-icon{color:"{{warn-contrast}}"}md-toolbar.md-warn>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused{background:"{{warn-contrast-0.1}}"}md-toast.md-THEME_NAME-theme .md-toast-content{background-color:#323232;color:"{{background-50}}"}md-toast.md-THEME_NAME-theme .md-toast-content .md-button{color:"{{background-50}}"}md-toast.md-THEME_NAME-theme .md-toast-content .md-button.md-highlight{color:"{{accent-color}}"}md-toast.md-THEME_NAME-theme .md-toast-content .md-button.md-highlight.md-primary{color:"{{primary-color}}"}md-toast.md-THEME_NAME-theme .md-toast-content .md-button.md-highlight.md-warn{color:"{{warn-color}}"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar){background-color:"{{primary-color}}";color:"{{primary-contrast}}"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) md-icon{color:"{{primary-contrast}}";fill:"{{primary-contrast}}"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) .md-button[disabled] md-icon{color:"{{primary-contrast-0.26}}";fill:"{{primary-contrast-0.26}}"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent{background-color:"{{accent-color}}";color:"{{accent-contrast}}"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent .md-ink-ripple{color:"{{accent-contrast}}"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent md-icon{color:"{{accent-contrast}}";fill:"{{accent-contrast}}"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent .md-button[disabled] md-icon{color:"{{accent-contrast-0.26}}";fill:"{{accent-contrast-0.26}}"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-warn{background-color:"{{warn-color}}";color:"{{warn-contrast}}"}.md-panel.md-tooltip.md-THEME_NAME-theme{color:"{{background-700-contrast}}";background-color:"{{background-700}}"}body.md-THEME_NAME-theme,html.md-THEME_NAME-theme{color:"{{foreground-1}}";background-color:"{{background-color}}"}')}(window,window.angular),window.ngMaterial={version:{full:"1.1.12"}};; 10511/* 10512 AngularJS v1.8.2 10513 (c) 2010-2020 Google LLC. http://angularjs.org 10514 License: MIT 10515*/ 10516(function(Y,z){'use strict';function Fa(a,b,c){if(!a)throw Pa("areq",b||"?",c||"required");return a}function Ga(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;Z(a)&&(a=a.join(" "));Z(b)&&(b=b.join(" "));return a+" "+b}function Qa(a){var b={};a&&(a.to||a.from)&&(b.to=a.to,b.from=a.from);return b}function $(a,b,c){var d="";a=Z(a)?a:a&&G(a)&&a.length?a.split(/\s+/):[];s(a,function(a,k){a&&0<a.length&&(d+=0<k?" ":"",d+=c?b+a:a+b)});return d}function Ha(a){if(a instanceof A)switch(a.length){case 0:return a; 10517case 1:if(1===a[0].nodeType)return a;break;default:return A(va(a))}if(1===a.nodeType)return A(a)}
vendor: 3,501 bytes, lines 10517-10524
10517function va(a){if(!a[0])return a;for(var b=0;b<a.length;b++){var c=a[b];if(1===c.nodeType)return c}}function Ra(a,b,c){s(b,function(b){a.addClass(b,c)})}function Sa(a,b,c){s(b,function(b){a.removeClass(b,c)})}function aa(a){return function(b,c){c.addClass&&(Ra(a,b,c.addClass),c.addClass=null);c.removeClass&&(Sa(a,b,c.removeClass),c.removeClass=null)}}function pa(a){a=a||{};if(!a.$$prepared){var b=a.domOperation|| 10518N;a.domOperation=function(){a.$$domOperationFired=!0;b();b=N};a.$$prepared=!0}return a}function ha(a,b){Ia(a,b);Ja(a,b)}function Ia(a,b){b.from&&(a.css(b.from),b.from=null)}function Ja(a,b){b.to&&(a.css(b.to),b.to=null)}function T(a,b,c){var d=b.options||{};c=c.options||{};var f=(d.addClass||"")+" "+(c.addClass||""),k=(d.removeClass||"")+" "+(c.removeClass||"");a=Ta(a.attr("class"),f,k);c.preparationClasses&&(d.preparationClasses=ba(c.preparationClasses,d.preparationClasses),delete c.preparationClasses); 10519f=d.domOperation!==N?d.domOperation:null;wa(d,c);f&&(d.domOperation=f);d.addClass=a.addClass?a.addClass:null;d.removeClass=a.removeClass?a.removeClass:null;b.addClass=d.addClass;b.removeClass=d.removeClass;return d}function Ta(a,b,c){function d(a){G(a)&&(a=a.split(" "));var c={};s(a,function(a){a.length&&(c[a]=!0)});return c}var f={};a=d(a);b=d(b);s(b,function(a,c){f[c]=1});c=d(c);s(c,function(a,c){f[c]=1===f[c]?null:-1});var k={addClass:"",removeClass:""};s(f,function(c,b){var d,f;1===c?(d="addClass", 10520f=!a[b]||a[b+"-remove"]):-1===c&&(d="removeClass",f=a[b]||a[b+"-add"]);f&&(k[d].length&&(k[d]+=" "),k[d]+=b)});return k}function K(a){return a instanceof A?a[0]:a}function Ua(a,b,c,d){a="";c&&(a=$(c,"ng-",!0));d.addClass&&(a=ba(a,$(d.addClass,"-add")));d.removeClass&&(a=ba(a,$(d.removeClass,"-remove")));a.length&&(d.preparationClasses=a,b.addClass(a))}function xa(a,b){var c=b?"paused":"",d=ca+"PlayState";ma(a,[d,c]);return[d,c]}function ma(a,b){a.style[b[0]]=b[1]}function ba(a,b){return a?b?a+" "+ 10521b:a:b}function Ka(a,b,c){var d=Object.create(null),f=a.getComputedStyle(b)||{};s(c,function(a,c){var b=f[a];if(b){var L=b.charAt(0);if("-"===L||"+"===L||0<=L)b=Va(b);0===b&&(b=null);d[c]=b}});return d}function Va(a){var b=0;a=a.split(/\s*,\s*/);s(a,function(a){"s"===a.charAt(a.length-1)&&(a=a.substring(0,a.length-1));a=parseFloat(a)||0;b=b?Math.max(a,b):a});return b}function ya(a){return 0===a||null!=a}function La(a,b){var c=M,d=a+"s";b?c+="Duration":d+=" linear all";return[c,d]}function Ma(a,b,c){s(c, 10522function(c){a[c]=za(a[c])?a[c]:b.style.getPropertyValue(c)})}var M,Aa,ca,Ba;void 0===Y.ontransitionend&&void 0!==Y.onwebkittransitionend?(M="WebkitTransition",Aa="webkitTransitionEnd transitionend"):(M="transition",Aa="transitionend");void 0===Y.onanimationend&&void 0!==Y.onwebkitanimationend?(ca="WebkitAnimation",Ba="webkitAnimationEnd animationend"):(ca="animation",Ba="animationend");var qa=ca+"Delay",Ca=ca+"Duration",na=M+"Delay",Na=M+"Duration",Pa=z.$$minErr("ng"),ra={blockTransitions:function(a, 10523b){var c=b?"-"+b+"s":"";ma(a,[na,c]);return[na,c]}},Wa={transitionDuration:Na,transitionDelay:na,transitionProperty:M+"Property",animationDuration:Ca,animationDelay:qa,animationIterationCount:ca+"IterationCount"},Xa={transitionDuration:Na,transitionDelay:na,animationDuration:Ca,animationDelay:qa},Da,wa,s,Z,za,sa,Ea,ta,G,R,A,N;z.module("ngAnimate",[],function(){N=z.noop;Da=z.copy;wa=z.extend;A=z.element;s=z.forEach;Z=z.isArray;G=z.isString;ta=z.isObject;R=z.isUndefined;za=z.isDefined;Ea=z.isFunction; 10524sa=z.isElement}).info({angularVersion:"1.8.2
vendor: 22,610 bytes, lines 10524-10569
10524"}).directive("ngAnimateSwap",["$animate",function(a){return{restrict:"A",transclude:"element",terminal:!0,priority:550,link:function(b,c,d,f,k){var e,Q;b.$watchCollection(d.ngAnimateSwap||d["for"],function(b){e&&a.leave(e);Q&&(Q.$destroy(),Q=null);(b||0===b)&&k(function(b,d){e=b;Q=d;a.enter(b,null,c)})})}}}]).directive("ngAnimateChildren",["$interpolate",function(a){return{link:function(b,c,d){function f(a){c.data("$$ngAnimateChildren","on"===a||"true"=== 10525a)}var k=d.ngAnimateChildren;G(k)&&0===k.length?c.data("$$ngAnimateChildren",!0):(f(a(k)(b)),d.$observe("ngAnimateChildren",f))}}}]).factory("$$rAFScheduler",["$$rAF",function(a){function b(a){d=d.concat(a);c()}function c(){if(d.length){for(var b=d.shift(),e=0;e<b.length;e++)b[e]();f||a(function(){f||c()})}}var d,f;d=b.queue=[];b.waitUntilQuiet=function(b){f&&f();f=a(function(){f=null;b();c()})};return b}]).provider("$$animateQueue",["$animateProvider",function(a){function b(a){return{addClass:a.addClass, 10526removeClass:a.removeClass,from:a.from,to:a.to}}function c(a){if(!a)return null;a=a.split(" ");var b=Object.create(null);s(a,function(a){b[a]=!0});return b}function d(a,b){if(a&&b){var d=c(b);return a.split(" ").some(function(a){return d[a]})}}function f(a,b,c){return e[a].some(function(a){return a(b,c)})}function k(a,b){var c=0<(a.addClass||"").length,d=0<(a.removeClass||"").length;return b?c&&d:c||d}var e=this.rules={skip:[],cancel:[],join:[]};e.join.push(function(a,b){return!a.structural&&k(a)}); 10527e.skip.push(function(a,b){return!a.structural&&!k(a)});e.skip.push(function(a,b){return"leave"===b.event&&a.structural});e.skip.push(function(a,b){return b.structural&&2===b.state&&!a.structural});e.cancel.push(function(a,b){return b.structural&&a.structural});e.cancel.push(function(a,b){return 2===b.state&&a.structural});e.cancel.push(function(a,b){if(b.structural)return!1;var c=a.addClass,f=a.removeClass,k=b.addClass,e=b.removeClass;return R(c)&&R(f)||R(k)&&R(e)?!1:d(c,e)||d(f,k)});this.$get=["$$rAF", 10528"$rootScope","$rootElement","$document","$$Map","$$animation","$$AnimateRunner","$templateRequest","$$jqLite","$$forceReflow","$$isDocumentHidden",function(c,d,e,C,U,oa,H,u,t,I,da){function ia(a){O.delete(a.target)}function v(){var a=!1;return function(b){a?b():d.$$postDigest(function(){a=!0;b()})}}function ua(a,b,c){var g=[],l=m[c];l&&s(l,function(l){Oa.call(l.node,b)?g.push(l.callback):"leave"===c&&Oa.call(l.node,a)&&g.push(l.callback)});return g}function h(a,b,c){var l=va(b);return a.filter(function(a){return!(a.node=== 10529l&&(!c||a.callback===c))})}function q(a,J,w){function e(a,b,l,g){u(function(){var a=ua(ia,m,b);a.length?c(function(){s(a,function(a){a(h,l,g)});"close"!==l||m.parentNode||D.off(m)}):"close"!==l||m.parentNode||D.off(m)});a.progress(b,l,g)}function I(a){var b=h,c=n;c.preparationClasses&&(b.removeClass(c.preparationClasses),c.preparationClasses=null);c.activeClasses&&(b.removeClass(c.activeClasses),c.activeClasses=null);W(h,n);ha(h,n);n.domOperation();q.complete(!a)}var n=Da(w),h=Ha(a),m=K(h),ia=m&& 10530m.parentNode,n=pa(n),q=new H,u=v();Z(n.addClass)&&(n.addClass=n.addClass.join(" "));n.addClass&&!G(n.addClass)&&(n.addClass=null);Z(n.removeClass)&&(n.removeClass=n.removeClass.join(" "));n.removeClass&&!G(n.removeClass)&&(n.removeClass=null);n.from&&!ta(n.from)&&(n.from=null);n.to&&!ta(n.to)&&(n.to=null);if(!(B&&m&&fa(m,J,w)&&Ya(m,n)))return I(),q;var x=0<=["enter","move","leave"].indexOf(J),r=da(),P=r||O.get(m);w=!P&&y.get(m)||{};var p=!!w.state;P||p&&1===w.state||(P=!E(m,ia,J));if(P)return r&& 10531e(q,J,"start",b(n)),I(),r&&e(q,J,"close",b(n)),q;x&&F(m);r={structural:x,element:h,event:J,addClass:n.addClass,removeClass:n.removeClass,close:I,options:n,runner:q};if(p){if(f("skip",r,w)){if(2===w.state)return I(),q;T(h,w,r);return w.runner}if(f("cancel",r,w))if(2===w.state)w.runner.end();else if(w.structural)w.close();else return T(h,w,r),w.runner;else if(f("join",r,w))if(2===w.state)T(h,r,{});else return Ua(t,h,x?J:null,n),J=r.event=w.event,n=T(h,w,r),w.runner}else T(h,r,{});(p=r.structural)|| 10532(p="animate"===r.event&&0<Object.keys(r.options.to||{}).length||k(r));if(!p)return I(),g(m),q;var C=(w.counter||0)+1;r.counter=C;l(m,1,r);d.$$postDigest(function(){h=Ha(a);var c=y.get(m),d=!c,c=c||{},t=0<(h.parent()||[]).length&&("animate"===c.event||c.structural||k(c));if(d||c.counter!==C||!t){d&&(W(h,n),ha(h,n));if(d||x&&c.event!==J)n.domOperation(),q.end();t||g(m)}else J=!c.structural&&k(c,!0)?"setClass":c.event,l(m,2),c=oa(h,J,c.options),q.setHost(c),e(q,J,"start",b(n)),c.done(function(a){I(!a); 10533(a=y.get(m))&&a.counter===C&&g(m);e(q,J,"close",b(n))})});return q}function F(a){a=a.querySelectorAll("[data-ng-animate]");s(a,function(a){var b=parseInt(a.getAttribute("data-ng-animate"),10),c=y.get(a);if(c)switch(b){case 2:c.runner.end();case 1:y.delete(a)}})}function g(a){a.removeAttribute("data-ng-animate");y.delete(a)}function E(a,b,c){c=C[0].body;var l=K(e),g=a===c||"HTML"===a.nodeName,d=a===l,t=!1,m=O.get(a),h;for((a=A.data(a,"$ngAnimatePin"))&&(b=K(a));b;){d||(d=b===l);if(1!==b.nodeType)break; 10534a=y.get(b)||{};if(!t){var f=O.get(b);if(!0===f&&!1!==m){m=!0;break}else!1===f&&(m=!1);t=a.structural}if(R(h)||!0===h)a=A.data(b,"$$ngAnimateChildren"),za(a)&&(h=a);if(t&&!1===h)break;g||(g=b===c);if(g&&d)break;if(!d&&(a=A.data(b,"$ngAnimatePin"))){b=K(a);continue}b=b.parentNode}return(!t||h)&&!0!==m&&d&&g}function l(a,b,c){c=c||{};c.state=b;a.setAttribute("data-ng-animate",b);c=(b=y.get(a))?wa(b,c):c;y.set(a,c)}var y=new U,O=new U,B=null,P=d.$watch(function(){return 0===u.totalPendingRequests},function(a){a&& 10535(P(),d.$$postDigest(function(){d.$$postDigest(function(){null===B&&(B=!0)})}))}),m=Object.create(null);U=a.customFilter();var la=a.classNameFilter();I=function(){return!0};var fa=U||I,Ya=la?function(a,b){var c=[a.getAttribute("class"),b.addClass,b.removeClass].join(" ");return la.test(c)}:I,W=aa(t),Oa=Y.Node.prototype.contains||function(a){return this===a||!!(this.compareDocumentPosition(a)&16)},D={on:function(a,b,c){var l=va(b);m[a]=m[a]||[];m[a].push({node:l,callback:c});A(b).on("$destroy",function(){y.get(l)|| 10536D.off(a,b,c)})},off:function(a,b,c){if(1!==arguments.length||G(arguments[0])){var l=m[a];l&&(m[a]=1===arguments.length?null:h(l,b,c))}else for(l in b=arguments[0],m)m[l]=h(m[l],b)},pin:function(a,b){Fa(sa(a),"element","not an element");Fa(sa(b),"parentElement","not an element");a.data("$ngAnimatePin",b)},push:function(a,b,c,l){c=c||{};c.domOperation=l;return q(a,b,c)},enabled:function(a,b){var c=arguments.length;if(0===c)b=!!B;else if(sa(a)){var l=K(a);if(1===c)b=!O.get(l);else{if(!O.has(l))A(a).on("$destroy", 10537ia);O.set(l,!b)}}else b=B=!!a;return b}};return D}]}]).provider("$$animateCache",function(){var a=0,b=Object.create(null);this.$get=[function(){return{cacheKey:function(b,d,f,k){var e=b.parentNode;b=[e.$$ngAnimateParentKey||(e.$$ngAnimateParentKey=++a),d,b.getAttribute("class")];f&&b.push(f);k&&b.push(k);return b.join(" ")},containsCachedAnimationWithoutDuration:function(a){return(a=b[a])&&!a.isValid||!1},flush:function(){b=Object.create(null)},count:function(a){return(a=b[a])?a.total:0},get:function(a){return(a= 10538b[a])&&a.value},put:function(a,d,f){b[a]?(b[a].total++,b[a].value=d):b[a]={total:1,value:d,isValid:f}}}}]}).provider("$$animation",["$animateProvider",function(a){var b=this.drivers=[];this.$get=["$$jqLite","$rootScope","$injector","$$AnimateRunner","$$Map","$$rAFScheduler","$$animateCache",function(a,d,f,k,e,Q,L){function x(a){function b(a){if(a.processed)return a;a.processed=!0;var d=a.domNode,t=d.parentNode;f.set(d,a);for(var h;t;){if(h=f.get(t)){h.processed||(h=b(h));break}t=t.parentNode}(h|| 10539c).children.push(a);return a}var c={children:[]},d,f=new e;for(d=0;d<a.length;d++){var da=a[d];f.set(da.domNode,a[d]={domNode:da.domNode,element:da.element,fn:da.fn,children:[]})}for(d=0;d<a.length;d++)b(a[d]);return function(a){var b=[],c=[],d;for(d=0;d<a.children.length;d++)c.push(a.children[d]);a=c.length;var t=0,f=[];for(d=0;d<c.length;d++){var g=c[d];0>=a&&(a=t,t=0,b.push(f),f=[]);f.push(g);g.children.forEach(function(a){t++;c.push(a)});a--}f.length&&b.push(f);return b}(c)}var C=[],U=aa(a);return function(e, 10540H,u){function t(a){a=a.hasAttribute("ng-animate-ref")?[a]:a.querySelectorAll("[ng-animate-ref]");var b=[];s(a,function(a){var c=a.getAttribute("ng-animate-ref");c&&c.length&&b.push(a)});return b}function I(a){var b=[],c={};s(a,function(a,d){var l=K(a.element),g=0<=["enter","move"].indexOf(a.event),l=a.structural?t(l):[];if(l.length){var f=g?"to":"from";s(l,function(a){var b=a.getAttribute("ng-animate-ref");c[b]=c[b]||{};c[b][f]={animationID:d,element:A(a)}})}else b.push(a)});var d={},g={};s(c,function(c, 10541t){var f=c.from,e=c.to;if(f&&e){var h=a[f.animationID],k=a[e.animationID],E=f.animationID.toString();if(!g[E]){var I=g[E]={structural:!0,beforeStart:function(){h.beforeStart();k.beforeStart()},close:function(){h.close();k.close()},classes:da(h.classes,k.classes),from:h,to:k,anchors:[]};I.classes.length?b.push(I):(b.push(h),b.push(k))}g[E].anchors.push({out:f.element,"in":e.element})}else f=f?f.animationID:e.animationID,e=f.toString(),d[e]||(d[e]=!0,b.push(a[f]))});return b}function da(a,b){a=a.split(" "); 10542b=b.split(" ");for(var c=[],d=0;d<a.length;d++){var g=a[d];if("ng-"!==g.substring(0,3))for(var t=0;t<b.length;t++)if(g===b[t]){c.push(g);break}}return c.join(" ")}function ia(a){for(var c=b.length-1;0<=c;c--){var d=f.get(b[c])(a);if(d)return d}}function v(a,b){function c(a){(a=a.data("$$animationRunner"))&&a.setHost(b)}a.from&&a.to?(c(a.from.element),c(a.to.element)):c(a.element)}function ua(){var a=e.data("$$animationRunner");!a||"leave"===H&&u.$$domOperationFired||a.end()}function h(b){e.off("$destroy", 10543ua);e.removeData("$$animationRunner");U(e,u);ha(e,u);u.domOperation();E&&a.removeClass(e,E);F.complete(!b)}u=pa(u);var q=0<=["enter","move","leave"].indexOf(H),F=new k({end:function(){h()},cancel:function(){h(!0)}});if(!b.length)return h(),F;var g=Ga(e.attr("class"),Ga(u.addClass,u.removeClass)),E=u.tempClasses;E&&(g+=" "+E,u.tempClasses=null);q&&e.data("$$animatePrepareClasses","ng-"+H+"-prepare");e.data("$$animationRunner",F);C.push({element:e,classes:g,event:H,structural:q,options:u,beforeStart:function(){E= 10544(E?E+" ":"")+"ng-animate";a.addClass(e,E);var b=e.data("$$animatePrepareClasses");b&&a.removeClass(e,b)},close:h});e.on("$destroy",ua);if(1<C.length)return F;d.$$postDigest(function(){var b=[];s(C,function(a){a.element.data("$$animationRunner")?b.push(a):a.close()});C.length=0;var d=I(b),g=[];s(d,function(a){var b=a.from?a.from.element:a.element,c=u.addClass,d=L.cacheKey(b[0],a.event,(c?c+" ":"")+"ng-animate",u.removeClass);g.push({element:b,domNode:K(b),fn:function(){var b,c=a.close;if(L.containsCachedAnimationWithoutDuration(d))c(); 10545else{a.beforeStart();if((a.anchors?a.from.element||a.to.element:a.element).data("$$animationRunner")){var g=ia(a);g&&(b=g.start)}b?(b=b(),b.done(function(a){c(!a)}),v(a,b)):c()}}})});for(var d=x(g),t=0;t<d.length;t++)for(var f=d[t],e=0;e<f.length;e++){var h=f[e],k=h.element;d[t][e]=h.fn;0===t?k.removeData("$$animatePrepareClasses"):(h=k.data("$$animatePrepareClasses"))&&a.addClass(k,h)}Q(d)});return F}}]}]).provider("$animateCss",["$animateProvider",function(a){this.$get=["$window","$$jqLite","$$AnimateRunner", 10546"$timeout","$$animateCache","$$forceReflow","$sniffer","$$rAFScheduler","$$animateQueue",function(a,c,d,f,k,e,Q,L,x){function C(d,f,e,x){var v,s="stagger-"+e;0<k.count(e)&&(v=k.get(s),v||(f=$(f,"-stagger"),c.addClass(d,f),v=Ka(a,d,x),v.animationDuration=Math.max(v.animationDuration,0),v.transitionDuration=Math.max(v.transitionDuration,0),c.removeClass(d,f),k.put(s,v,!0)));return v||{}}function U(a){u.push(a);L.waitUntilQuiet(function(){k.flush();for(var a=e(),b=0;b<u.length;b++)u[b](a);u.length=0})} 10547function z(c,d,f,e){d=k.get(f);d||(d=Ka(a,c,Wa),"infinite"===d.animationIterationCount&&(d.animationIterationCount=1));k.put(f,d,e||0<d.transitionDuration||0<d.animationDuration);c=d;f=c.animationDelay;e=c.transitionDelay;c.maxDelay=f&&e?Math.max(f,e):f||e;c.maxDuration=Math.max(c.animationDuration*c.animationIterationCount,c.transitionDuration);return c}var H=aa(c),u=[];return function(a,b){function e(){v()}function L(){v(!0)}function v(b){if(!(P||la&&m)){P=!0;m=!1;V&&!g.$$skipPreparationClasses&& 10548c.removeClass(a,V);ba&&c.removeClass(a,ba);xa(l,!1);ra.blockTransitions(l,!1);s(y,function(a){l.style[a[0]]=""});H(a,g);ha(a,g);Object.keys(E).length&&s(E,function(a,b){a?l.style.setProperty(b,a):l.style.removeProperty(b)});if(g.onDone)g.onDone();w&&w.length&&a.off(w.join(" "),q);var d=a.data("$$animateCss");d&&(f.cancel(d[0].timer),a.removeData("$$animateCss"));fa&&fa.complete(!b)}}function u(a){p.blockTransition&&ra.blockTransitions(l,a);p.blockKeyframeAnimation&&xa(l,!!a)}function h(){fa=new d({end:e, 10549cancel:L});U(N);v();return{$$willAnimate:!1,start:function(){return fa},end:e}}function q(a){a.stopPropagation();var b=a.originalEvent||a;b.target===l&&(a=b.$manualTimeStamp||Date.now(),b=parseFloat(b.elapsedTime.toFixed(3)),Math.max(a-J,0)>=G&&b>=D&&(la=!0,v()))}function F(){function b(){if(!P){u(!1);s(y,function(a){l.style[a[0]]=a[1]});H(a,g);c.addClass(a,ba);if(p.recalculateTimingStyles){T=l.getAttribute("class")+" "+V;ka=k.cacheKey(l,ja,g.addClass,g.removeClass);r=z(l,T,ka,!1);ga=r.maxDelay;W= 10550Math.max(ga,0);D=r.maxDuration;if(0===D){v();return}p.hasTransitions=0<r.transitionDuration;p.hasAnimations=0<r.animationDuration}p.applyAnimationDelay&&(ga="boolean"!==typeof g.delay&&ya(g.delay)?parseFloat(g.delay):ga,W=Math.max(ga,0),r.animationDelay=ga,ea=[qa,ga+"s"],y.push(ea),l.style[ea[0]]=ea[1]);G=1E3*W;R=1E3*D;if(g.easing){var e,h=g.easing;p.hasTransitions&&(e=M+"TimingFunction",y.push([e,h]),l.style[e]=h);p.hasAnimations&&(e=ca+"TimingFunction",y.push([e,h]),l.style[e]=h)}r.transitionDuration&& 10551w.push(Aa);r.animationDuration&&w.push(Ba);J=Date.now();var m=G+1.5*R;e=J+m;var h=a.data("$$animateCss")||[],F=!0;if(h.length){var n=h[0];(F=e>n.expectedEndTime)?f.cancel(n.timer):h.push(v)}F&&(m=f(d,m,!1),h[0]={timer:m,expectedEndTime:e},h.push(v),a.data("$$animateCss",h));if(w.length)a.on(w.join(" "),q);g.to&&(g.cleanupStyles&&Ma(E,l,Object.keys(g.to)),Ja(a,g))}}function d(){var b=a.data("$$animateCss");if(b){for(var c=1;c<b.length;c++)b[c]();a.removeData("$$animateCss")}}if(!P)if(l.parentNode){var e= 10552function(a){if(la)m&&a&&(m=!1,v());else if(m=!a,r.animationDuration)if(a=xa(l,m),m)y.push(a);else{var b=y,c=b.indexOf(a);0<=a&&b.splice(c,1)}},h=0<aa&&(r.transitionDuration&&0===X.transitionDuration||r.animationDuration&&0===X.animationDuration)&&Math.max(X.animationDelay,X.transitionDelay);h?f(b,Math.floor(h*aa*1E3),!1):b();A.resume=function(){e(!0)};A.pause=function(){e(!1)}}else v()}var g=b||{};g.$$prepared||(g=pa(Da(g)));var E={},l=K(a);if(!l||!l.parentNode||!x.enabled())return h();var y=[],O= 10553a.attr("class"),B=Qa(g),P,m,la,fa,A,W,G,D,R,J,w=[];if(0===g.duration||!Q.animations&&!Q.transitions)return h();var ja=g.event&&Z(g.event)?g.event.join(" "):g.event,Y=ja&&g.structural,n="",S="";Y?n=$(ja,"ng-",!0):ja&&(n=ja);g.addClass&&(S+=$(g.addClass,"-add"));g.removeClass&&(S.length&&(S+=" "),S+=$(g.removeClass,"-remove"));g.applyClassesEarly&&S.length&&H(a,g);var V=[n,S].join(" ").trim(),T=O+" "+V,O=B.to&&0<Object.keys(B.to).length;if(!(0<(g.keyframeStyle||"").length||O||V))return h();var X,ka= 10554k.cacheKey(l,ja,g.addClass,g.removeClass);if(k.containsCachedAnimationWithoutDuration(ka))return V=null,h();0<g.stagger?(B=parseFloat(g.stagger),X={transitionDelay:B,animationDelay:B,transitionDuration:0,animationDuration:0}):X=C(l,V,ka,Xa);g.$$skipPreparationClasses||c.addClass(a,V);g.transitionStyle&&(B=[M,g.transitionStyle],ma(l,B),y.push(B));0<=g.duration&&(B=0<l.style[M].length,B=La(g.duration,B),ma(l,B),y.push(B));g.keyframeStyle&&(B=[ca,g.keyframeStyle],ma(l,B),y.push(B));var aa=X?0<=g.staggerIndex? 10555g.staggerIndex:k.count(ka):0;(n=0===aa)&&!g.skipBlocking&&ra.blockTransitions(l,9999);var r=z(l,T,ka,!Y),ga=r.maxDelay;W=Math.max(ga,0);D=r.maxDuration;var p={};p.hasTransitions=0<r.transitionDuration;p.hasAnimations=0<r.animationDuration;p.hasTransitionAll=p.hasTransitions&&"all"===r.transitionProperty;p.applyTransitionDuration=O&&(p.hasTransitions&&!p.hasTransitionAll||p.hasAnimations&&!p.hasTransitions);p.applyAnimationDuration=g.duration&&p.hasAnimations;p.applyTransitionDelay=ya(g.delay)&&(p.applyTransitionDuration|| 10556p.hasTransitions);p.applyAnimationDelay=ya(g.delay)&&p.hasAnimations;p.recalculateTimingStyles=0<S.length;if(p.applyTransitionDuration||p.applyAnimationDuration)D=g.duration?parseFloat(g.duration):D,p.applyTransitionDuration&&(p.hasTransitions=!0,r.transitionDuration=D,B=0<l.style[M+"Property"].length,y.push(La(D,B))),p.applyAnimationDuration&&(p.hasAnimations=!0,r.animationDuration=D,y.push([Ca,D+"s"]));if(0===D&&!p.recalculateTimingStyles)return h();var ba=$(V,"-active");if(null!=g.delay){var ea; 10557"boolean"!==typeof g.delay&&(ea=parseFloat(g.delay),W=Math.max(ea,0));p.applyTransitionDelay&&y.push([na,ea+"s"]);p.applyAnimationDelay&&y.push([qa,ea+"s"])}null==g.duration&&0<r.transitionDuration&&(p.recalculateTimingStyles=p.recalculateTimingStyles||n);G=1E3*W;R=1E3*D;g.skipBlocking||(p.blockTransition=0<r.transitionDuration,p.blockKeyframeAnimation=0<r.animationDuration&&0<X.animationDelay&&0===X.animationDuration);g.from&&(g.cleanupStyles&&Ma(E,l,Object.keys(g.from)),Ia(a,g));p.blockTransition|| 10558p.blockKeyframeAnimation?u(D):g.skipBlocking||ra.blockTransitions(l,!1);return{$$willAnimate:!0,end:e,start:function(){if(!P)return A={end:e,cancel:L,resume:null,pause:null},fa=new d(A),U(F),fa}}}}]}]).provider("$$animateCssDriver",["$$animationProvider",function(a){a.drivers.push("$$animateCssDriver");this.$get=["$animateCss","$rootScope","$$AnimateRunner","$rootElement","$sniffer","$$jqLite","$document",function(a,c,d,f,k,e,Q){function L(a){return a.replace(/\bng-\S+\b/g,"")}function x(a,b){G(a)&& 10559(a=a.split(" "));G(b)&&(b=b.split(" "));return a.filter(function(a){return-1===b.indexOf(a)}).join(" ")}function C(c,e,f){function k(a){var b={},c=K(a).getBoundingClientRect();s(["width","height","top","left"],function(a){var d=c[a];switch(a){case "top":d+=H.scrollTop;break;case "left":d+=H.scrollLeft}b[a]=Math.floor(d)+"px"});return b}function v(){var c=L(f.attr("class")||""),d=x(c,q),c=x(q,c),d=a(h,{to:k(f),addClass:"ng-anchor-in "+d,removeClass:"ng-anchor-out "+c,delay:!0});return d.$$willAnimate? 10560d:null}function C(){h.remove();e.removeClass("ng-animate-shim");f.removeClass("ng-animate-shim")}var h=A(K(e).cloneNode(!0)),q=L(h.attr("class")||"");e.addClass("ng-animate-shim");f.addClass("ng-animate-shim");h.addClass("ng-anchor");u.append(h);var F;c=function(){var c=a(h,{addClass:"ng-anchor-out",delay:!0,from:k(e)});return c.$$willAnimate?c:null}();if(!c&&(F=v(),!F))return C();var g=c||F;return{start:function(){function a(){c&&c.end()}var b,c=g.start();c.done(function(){c=null;if(!F&&(F=v()))return c= 10561F.start(),c.done(function(){c=null;C();b.complete()}),c;C();b.complete()});return b=new d({end:a,cancel:a})}}}function z(a,b,c,e){var f=oa(a,N),k=oa(b,N),h=[];s(e,function(a){(a=C(c,a.out,a["in"]))&&h.push(a)});if(f||k||0!==h.length)return{start:function(){function a(){s(b,function(a){a.end()})}var b=[];f&&b.push(f.start());k&&b.push(k.start());s(h,function(a){b.push(a.start())});var c=new d({end:a,cancel:a});d.all(b,function(a){c.complete(a)});return c}}}function oa(c){var d=c.element,e=c.options|| 10562{};c.structural&&(e.event=c.event,e.structural=!0,e.applyClassesEarly=!0,"leave"===c.event&&(e.onDone=e.domOperation));e.preparationClasses&&(e.event=ba(e.event,e.preparationClasses));c=a(d,e);return c.$$willAnimate?c:null}if(!k.animations&&!k.transitions)return N;var H=Q[0].body;c=K(f);var u=A(c.parentNode&&11===c.parentNode.nodeType||H.contains(c)?c:H);return function(a){return a.from&&a.to?z(a.from,a.to,a.classes,a.anchors):oa(a)}}]}]).provider("$$animateJs",["$animateProvider",function(a){this.$get= 10563["$injector","$$AnimateRunner","$$jqLite",function(b,c,d){function f(c){c=Z(c)?c:c.split(" ");for(var d=[],f={},k=0;k<c.length;k++){var s=c[k],z=a.$$registeredAnimations[s];z&&!f[s]&&(d.push(b.get(z)),f[s]=!0)}return d}var k=aa(d);return function(a,b,d,x){function C(){x.domOperation();k(a,x)}function z(a,b,d,f,e){switch(d){case "animate":b=[b,f.from,f.to,e];break;case "setClass":b=[b,t,I,e];break;case "addClass":b=[b,t,e];break;case "removeClass":b=[b,I,e];break;default:b=[b,e]}b.push(f);if(a=a.apply(a, 10564b))if(Ea(a.start)&&(a=a.start()),a instanceof c)a.done(e);else if(Ea(a))return a;return N}function A(a,b,d,e,f){var h=[];s(e,function(e){var l=e[f];l&&h.push(function(){var e,f,h=!1,k=function(a){h||(h=!0,(f||N)(a),e.complete(!a))};e=new c({end:function(){k()},cancel:function(){k(!0)}});f=z(l,a,b,d,function(a){k(!1===a)});return e})});return h}function H(a,b,d,e,f){var h=A(a,b,d,e,f);if(0===h.length){var k,q;"beforeSetClass"===f?(k=A(a,"removeClass",d,e,"beforeRemoveClass"),q=A(a,"addClass",d,e,"beforeAddClass")): 10565"setClass"===f&&(k=A(a,"removeClass",d,e,"removeClass"),q=A(a,"addClass",d,e,"addClass"));k&&(h=h.concat(k));q&&(h=h.concat(q))}if(0!==h.length)return function(a){var b=[];h.length&&s(h,function(a){b.push(a())});b.length?c.all(b,a):a();return function(a){s(b,function(b){a?b.cancel():b.end()})}}}var u=!1;3===arguments.length&&ta(d)&&(x=d,d=null);x=pa(x);d||(d=a.attr("class")||"",x.addClass&&(d+=" "+x.addClass),x.removeClass&&(d+=" "+x.removeClass));var t=x.addClass,I=x.removeClass,G=f(d),K,v;if(G.length){var M, 10566h;"leave"===b?(h="leave",M="afterLeave"):(h="before"+b.charAt(0).toUpperCase()+b.substr(1),M=b);"enter"!==b&&"move"!==b&&(K=H(a,b,x,G,h));v=H(a,b,x,G,M)}if(K||v){var q;return{$$willAnimate:!0,end:function(){q?q.end():(u=!0,C(),ha(a,x),q=new c,q.complete(!0));return q},start:function(){function b(c){u=!0;C();ha(a,x);q.complete(c)}if(q)return q;q=new c;var d,f=[];K&&f.push(function(a){d=K(a)});f.length?f.push(function(a){C();a(!0)}):C();v&&f.push(function(a){d=v(a)});q.setHost({end:function(){u||((d|| 10567N)(void 0),b(void 0))},cancel:function(){u||((d||N)(!0),b(!0))}});c.chain(f,b);return q}}}}}]}]).provider("$$animateJsDriver",["$$animationProvider",function(a){a.drivers.push("$$animateJsDriver");this.$get=["$$animateJs","$$AnimateRunner",function(a,c){function d(c){return a(c.element,c.event,c.classes,c.options)}return function(a){if(a.from&&a.to){var b=d(a.from),e=d(a.to);if(b||e)return{start:function(){function a(){return function(){s(d,function(a){a.end()})}}var d=[];b&&d.push(b.start());e&& 10568d.push(e.start());c.all(d,function(a){f.complete(a)});var f=new c({end:a(),cancel:a()});return f}}}else return d(a)}}]}])})(window,window.angular); 10569//# sourceMappingURL=angular-animate.min.js.map
10570; 10571/** 10572 * @license AngularJS v1.8.2 10573 * (c) 2010-2020 Google LLC. http://angularjs.org 10574 * License: MIT 10575 */ 10576(function(window, angular) {'use strict'; 10577 10578/** 10579 * @ngdoc module 10580 * @name ngAria 10581 * @description 10582 * 10583 * The `ngAria` module provides support for common 10584 * [<abbr title="Accessible Rich Internet Applications">ARIA</abbr>](http://www.w3.org/TR/wai-aria/) 10585 * attributes that convey state or semantic information about the application for users 10586 * of assistive technologies, such as screen readers. 10587 * 10588 * ## Usage 10589 * 10590 * For ngAria to do its magic, simply include the module `ngAria` as a dependency. The following 10591 * directives are supported: 10592 * `ngModel`, `ngChecked`, `ngReadonly`, `ngRequired`, `ngValue`, `ngDisabled`, `ngShow`, `ngHide`, 10593 * `ngClick`, `ngDblClick`, and `ngMessages`. 10594 * 10595 * Below is a more detailed breakdown of the attributes handled by ngAria: 10596 * 10597 * | Directive | Supported Attributes | 10598 * |---------------------------------------------|-----------------------------------------------------------------------------------------------------| 10599 * | {@link ng.directive:ngModel ngModel} | aria-checked, aria-valuemin, aria-valuemax, aria-valuenow, aria-invalid, aria-required, input roles | 10600 * | {@link ng.directive:ngDisabled ngDisabled} | aria-disabled | 10601 * | {@link ng.directive:ngRequired ngRequired} | aria-required | 10602 * | {@link ng.directive:ngChecked ngChecked} | aria-checked | 10603 * | {@link ng.directive:ngReadonly ngReadonly} | aria-readonly | 10604 * | {@link ng.directive:ngValue ngValue} | aria-checked | 10605 * | {@link ng.directive:ngShow ngShow} | aria-hidden | 10606 * | {@link ng.directive:ngHide ngHide} | aria-hidden | 10607 * | {@link ng.directive:ngDblclick ngDblclick} | tabindex | 10608 * | {@link module:ngMessages ngMessages} | aria-live | 10609 * | {@link ng.directive:ngClick ngClick} | tabindex, keydown event, button role | 10610 * 10611 * Find out more information about each directive by reading the 10612 * {@link guide/accessibility ngAria Developer Guide}. 10613 * 10614 * ## Example 10615 * Using ngDisabled with ngAria: 10616 * ```html 10617 * <md-checkbox ng-disabled="disabled"> 10618 * ``` 10619 * Becomes: 10620 * ```html 10621 * <md-checkbox ng-disabled="disabled" aria-disabled="true"> 10622 * ``` 10623 * 10624 * ## Disabling Specific Attributes 10625 * It is possible to disable individual attributes added by ngAria with the 10626 * {@link ngAria.$ariaProvider#config config} method. For more details, see the 10627 * {@link guide/accessibility Developer Guide}. 10628 * 10629 * ## Disabling `ngAria` on Specific Elements 10630 * It is possible to make `ngAria` ignore a specific element, by adding the `ng-aria-disable` 10631 * attribute on it. Note that only the element itself (and not its child elements) will be ignored. 10632 */ 10633var ARIA_DISABLE_ATTR = 'ngAriaDisable'; 10634 10635var ngAriaModule = angular.module('ngAria', ['ng']). 10636 info({ angularVersion: '1.8.2
vendor: 12,776 bytes, lines 10636-10996
10636' }). 10637 provider('$aria', $AriaProvider); 10638 10639/** 10640* Internal Utilities 10641*/ 10642var nativeAriaNodeNames = ['BUTTON', 'A', 'INPUT', 'TEXTAREA', 'SELECT', 'DETAILS', 'SUMMARY']; 10643 10644var isNodeOneOf = function(elem, nodeTypeArray) { 10645 if (nodeTypeArray.indexOf(elem[0].nodeName) !== -1) { 10646 return true; 10647 } 10648}; 10649/** 10650 * @ngdoc provider 10651 * @name $ariaProvider 10652 * @this 10653 * 10654 * @description 10655 * 10656 * Used for configuring the ARIA attributes injected and managed by ngAria. 10657 * 10658 * ```js 10659 * angular.module('myApp', ['ngAria'], function config($ariaProvider) { 10660 * $ariaProvider.config({ 10661 * ariaValue: true, 10662 * tabindex: false 10663 * }); 10664 * }); 10665 *``` 10666 * 10667 * ## Dependencies 10668 * Requires the {@link ngAria} module to be installed. 10669 * 10670 */ 10671function $AriaProvider() { 10672 var config = { 10673 ariaHidden: true, 10674 ariaChecked: true, 10675 ariaReadonly: true, 10676 ariaDisabled: true, 10677 ariaRequired: true, 10678 ariaInvalid: true, 10679 ariaValue: true, 10680 tabindex: true, 10681 bindKeydown: true, 10682 bindRoleForClick: true 10683 }; 10684 10685 /** 10686 * @ngdoc method 10687 * @name $ariaProvider#config 10688 * 10689 * @param {object} config object to enable/disable specific ARIA attributes 10690 * 10691 * - **ariaHidden** – `{boolean}` – Enables/disables aria-hidden tags 10692 * - **ariaChecked** – `{boolean}` – Enables/disables aria-checked tags 10693 * - **ariaReadonly** – `{boolean}` – Enables/disables aria-readonly tags 10694 * - **ariaDisabled** – `{boolean}` – Enables/disables aria-disabled tags 10695 * - **ariaRequired** – `{boolean}` – Enables/disables aria-required tags 10696 * - **ariaInvalid** – `{boolean}` – Enables/disables aria-invalid tags 10697 * - **ariaValue** – `{boolean}` – Enables/disables aria-valuemin, aria-valuemax and 10698 * aria-valuenow tags 10699 * - **tabindex** – `{boolean}` – Enables/disables tabindex tags 10700 * - **bindKeydown** – `{boolean}` – Enables/disables keyboard event binding on non-interactive 10701 * elements (such as `div` or `li`) using ng-click, making them more accessible to users of 10702 * assistive technologies 10703 * - **bindRoleForClick** – `{boolean}` – Adds role=button to non-interactive elements (such as 10704 * `div` or `li`) using ng-click, making them more accessible to users of assistive 10705 * technologies 10706 * 10707 * @description 10708 * Enables/disables various ARIA attributes 10709 */ 10710 this.config = function(newConfig) { 10711 config = angular.extend(config, newConfig); 10712 }; 10713 10714 function watchExpr(attrName, ariaAttr, nativeAriaNodeNames, negate) { 10715 return function(scope, elem, attr) { 10716 if (attr.hasOwnProperty(ARIA_DISABLE_ATTR)) return; 10717 10718 var ariaCamelName = attr.$normalize(ariaAttr); 10719 if (config[ariaCamelName] && !isNodeOneOf(elem, nativeAriaNodeNames) && !attr[ariaCamelName]) { 10720 scope.$watch(attr[attrName], function(boolVal) { 10721 // ensure boolean value 10722 boolVal = negate ? !boolVal : !!boolVal; 10723 elem.attr(ariaAttr, boolVal); 10724 }); 10725 } 10726 }; 10727 } 10728 /** 10729 * @ngdoc service 10730 * @name $aria 10731 * 10732 * @description 10733 * 10734 * The $aria service contains helper methods for applying common 10735 * [ARIA](http://www.w3.org/TR/wai-aria/) attributes to HTML directives. 10736 * 10737 * ngAria injects common accessibility attributes that tell assistive technologies when HTML 10738 * elements are enabled, selected, hidden, and more. To see how this is performed with ngAria, 10739 * let's review a code snippet from ngAria itself: 10740 * 10741 *```js 10742 * ngAriaModule.directive('ngDisabled', ['$aria', function($aria) { 10743 * return $aria.$$watchExpr('ngDisabled', 'aria-disabled', nativeAriaNodeNames, false); 10744 * }]) 10745 *``` 10746 * Shown above, the ngAria module creates a directive with the same signature as the 10747 * traditional `ng-disabled` directive. But this ngAria version is dedicated to 10748 * solely managing accessibility attributes on custom elements. The internal `$aria` service is 10749 * used to watch the boolean attribute `ngDisabled`. If it has not been explicitly set by the 10750 * developer, `aria-disabled` is injected as an attribute with its value synchronized to the 10751 * value in `ngDisabled`. 10752 * 10753 * Because ngAria hooks into the `ng-disabled` directive, developers do not have to do 10754 * anything to enable this feature. The `aria-disabled` attribute is automatically managed 10755 * simply as a silent side-effect of using `ng-disabled` with the ngAria module. 10756 * 10757 * The full list of directives that interface with ngAria: 10758 * * **ngModel** 10759 * * **ngChecked** 10760 * * **ngReadonly** 10761 * * **ngRequired** 10762 * * **ngDisabled** 10763 * * **ngValue** 10764 * * **ngShow** 10765 * * **ngHide** 10766 * * **ngClick** 10767 * * **ngDblclick** 10768 * * **ngMessages** 10769 * 10770 * Read the {@link guide/accessibility ngAria Developer Guide} for a thorough explanation of each 10771 * directive. 10772 * 10773 * 10774 * ## Dependencies 10775 * Requires the {@link ngAria} module to be installed. 10776 */ 10777 this.$get = function() { 10778 return { 10779 config: function(key) { 10780 return config[key]; 10781 }, 10782 $$watchExpr: watchExpr 10783 }; 10784 }; 10785} 10786 10787 10788ngAriaModule.directive('ngShow', ['$aria', function($aria) { 10789 return $aria.$$watchExpr('ngShow', 'aria-hidden', [], true); 10790}]) 10791.directive('ngHide', ['$aria', function($aria) { 10792 return $aria.$$watchExpr('ngHide', 'aria-hidden', [], false); 10793}]) 10794.directive('ngValue', ['$aria', function($aria) { 10795 return $aria.$$watchExpr('ngValue', 'aria-checked', nativeAriaNodeNames, false); 10796}]) 10797.directive('ngChecked', ['$aria', function($aria) { 10798 return $aria.$$watchExpr('ngChecked', 'aria-checked', nativeAriaNodeNames, false); 10799}]) 10800.directive('ngReadonly', ['$aria', function($aria) { 10801 return $aria.$$watchExpr('ngReadonly', 'aria-readonly', nativeAriaNodeNames, false); 10802}]) 10803.directive('ngRequired', ['$aria', function($aria) { 10804 return $aria.$$watchExpr('ngRequired', 'aria-required', nativeAriaNodeNames, false); 10805}]) 10806.directive('ngModel', ['$aria', function($aria) { 10807 10808 function shouldAttachAttr(attr, normalizedAttr, elem, allowNonAriaNodes) { 10809 return $aria.config(normalizedAttr) && 10810 !elem.attr(attr) && 10811 (allowNonAriaNodes || !isNodeOneOf(elem, nativeAriaNodeNames)) && 10812 (elem.attr('type') !== 'hidden' || elem[0].nodeName !== 'INPUT'); 10813 } 10814 10815 function shouldAttachRole(role, elem) { 10816 // if element does not have role attribute 10817 // AND element type is equal to role (if custom element has a type equaling shape) <-- remove? 10818 // AND element is not in nativeAriaNodeNames 10819 return !elem.attr('role') && (elem.attr('type') === role) && !isNodeOneOf(elem, nativeAriaNodeNames); 10820 } 10821 10822 function getShape(attr, elem) { 10823 var type = attr.type, 10824 role = attr.role; 10825 10826 return ((type || role) === 'checkbox' || role === 'menuitemcheckbox') ? 'checkbox' : 10827 ((type || role) === 'radio' || role === 'menuitemradio') ? 'radio' : 10828 (type === 'range' || role === 'progressbar' || role === 'slider') ? 'range' : ''; 10829 } 10830 10831 return { 10832 restrict: 'A', 10833 require: 'ngModel', 10834 priority: 200, //Make sure watches are fired after any other directives that affect the ngModel value 10835 compile: function(elem, attr) { 10836 if (attr.hasOwnProperty(ARIA_DISABLE_ATTR)) return; 10837 10838 var shape = getShape(attr, elem); 10839 10840 return { 10841 post: function(scope, elem, attr, ngModel) { 10842 var needsTabIndex = shouldAttachAttr('tabindex', 'tabindex', elem, false); 10843 10844 function ngAriaWatchModelValue() { 10845 return ngModel.$modelValue; 10846 } 10847 10848 function getRadioReaction(newVal) { 10849 // Strict comparison would cause a BC 10850 // eslint-disable-next-line eqeqeq 10851 var boolVal = (attr.value == ngModel.$viewValue); 10852 elem.attr('aria-checked', boolVal); 10853 } 10854 10855 function getCheckboxReaction() { 10856 elem.attr('aria-checked', !ngModel.$isEmpty(ngModel.$viewValue)); 10857 } 10858 10859 switch (shape) { 10860 case 'radio': 10861 case 'checkbox': 10862 if (shouldAttachRole(shape, elem)) { 10863 elem.attr('role', shape); 10864 } 10865 if (shouldAttachAttr('aria-checked', 'ariaChecked', elem, false)) { 10866 scope.$watch(ngAriaWatchModelValue, shape === 'radio' ? 10867 getRadioReaction : getCheckboxReaction); 10868 } 10869 if (needsTabIndex) { 10870 elem.attr('tabindex', 0); 10871 } 10872 break; 10873 case 'range': 10874 if (shouldAttachRole(shape, elem)) { 10875 elem.attr('role', 'slider'); 10876 } 10877 if ($aria.config('ariaValue')) { 10878 var needsAriaValuemin = !elem.attr('aria-valuemin') && 10879 (attr.hasOwnProperty('min') || attr.hasOwnProperty('ngMin')); 10880 var needsAriaValuemax = !elem.attr('aria-valuemax') && 10881 (attr.hasOwnProperty('max') || attr.hasOwnProperty('ngMax')); 10882 var needsAriaValuenow = !elem.attr('aria-valuenow'); 10883 10884 if (needsAriaValuemin) { 10885 attr.$observe('min', function ngAriaValueMinReaction(newVal) { 10886 elem.attr('aria-valuemin', newVal); 10887 }); 10888 } 10889 if (needsAriaValuemax) { 10890 attr.$observe('max', function ngAriaValueMinReaction(newVal) { 10891 elem.attr('aria-valuemax', newVal); 10892 }); 10893 } 10894 if (needsAriaValuenow) { 10895 scope.$watch(ngAriaWatchModelValue, function ngAriaValueNowReaction(newVal) { 10896 elem.attr('aria-valuenow', newVal); 10897 }); 10898 } 10899 } 10900 if (needsTabIndex) { 10901 elem.attr('tabindex', 0); 10902 } 10903 break; 10904 } 10905 10906 if (!attr.hasOwnProperty('ngRequired') && ngModel.$validators.required 10907 && shouldAttachAttr('aria-required', 'ariaRequired', elem, false)) { 10908 // ngModel.$error.required is undefined on custom controls 10909 attr.$observe('required', function() { 10910 elem.attr('aria-required', !!attr['required']); 10911 }); 10912 } 10913 10914 if (shouldAttachAttr('aria-invalid', 'ariaInvalid', elem, true)) { 10915 scope.$watch(function ngAriaInvalidWatch() { 10916 return ngModel.$invalid; 10917 }, function ngAriaInvalidReaction(newVal) { 10918 elem.attr('aria-invalid', !!newVal); 10919 }); 10920 } 10921 } 10922 }; 10923 } 10924 }; 10925}]) 10926.directive('ngDisabled', ['$aria', function($aria) { 10927 return $aria.$$watchExpr('ngDisabled', 'aria-disabled', nativeAriaNodeNames, false); 10928}]) 10929.directive('ngMessages', function() { 10930 return { 10931 restrict: 'A', 10932 require: '?ngMessages', 10933 link: function(scope, elem, attr, ngMessages) { 10934 if (attr.hasOwnProperty(ARIA_DISABLE_ATTR)) return; 10935 10936 if (!elem.attr('aria-live')) { 10937 elem.attr('aria-live', 'assertive'); 10938 } 10939 } 10940 }; 10941}) 10942.directive('ngClick',['$aria', '$parse', function($aria, $parse) { 10943 return { 10944 restrict: 'A', 10945 compile: function(elem, attr) { 10946 if (attr.hasOwnProperty(ARIA_DISABLE_ATTR)) return; 10947 10948 var fn = $parse(attr.ngClick); 10949 return function(scope, elem, attr) { 10950 10951 if (!isNodeOneOf(elem, nativeAriaNodeNames)) { 10952 10953 if ($aria.config('bindRoleForClick') && !elem.attr('role')) { 10954 elem.attr('role', 'button'); 10955 } 10956 10957 if ($aria.config('tabindex') && !elem.attr('tabindex')) { 10958 elem.attr('tabindex', 0); 10959 } 10960 10961 if ($aria.config('bindKeydown') && !attr.ngKeydown && !attr.ngKeypress && !attr.ngKeyup) { 10962 elem.on('keydown', function(event) { 10963 var keyCode = event.which || event.keyCode; 10964 10965 if (keyCode === 13 || keyCode === 32) { 10966 // If the event is triggered on a non-interactive element ... 10967 if (nativeAriaNodeNames.indexOf(event.target.nodeName) === -1 && !event.target.isContentEditable) { 10968 // ... prevent the default browser behavior (e.g. scrolling when pressing spacebar) 10969 // See https://github.com/angular/angular.js/issues/16664 10970 event.preventDefault(); 10971 } 10972 scope.$apply(callback); 10973 } 10974 10975 function callback() { 10976 fn(scope, { $event: event }); 10977 } 10978 }); 10979 } 10980 } 10981 }; 10982 } 10983 }; 10984}]) 10985.directive('ngDblclick', ['$aria', function($aria) { 10986 return function(scope, elem, attr) { 10987 if (attr.hasOwnProperty(ARIA_DISABLE_ATTR)) return; 10988 10989 if ($aria.config('tabindex') && !elem.attr('tabindex') && !isNodeOneOf(elem, nativeAriaNodeNames)) { 10990 elem.attr('tabindex', 0); 10991 } 10992 }; 10993}]); 10994 10995 10996})(window, window.angular);
vendor: 13,163 bytes, lines 10997-11157
10997; 10998/* 10999 AngularJS v1.8.2 11000 (c) 2010-2020 Google LLC. http://angularjs.org 11001 License: MIT 11002*/ 11003(function(s,e){'use strict';function O(e){var g=[];B(g,D).chars(e);return g.join("")}var C=e.$$minErr("$sanitize"),E,g,F,G,H,q,D,I,J,B;e.module("ngSanitize",[]).provider("$sanitize",function(){function h(a,d){return A(a.split(","),d)}function A(a,d){var c={},b;for(b=0;b<a.length;b++)c[d?q(a[b]):a[b]]=!0;return c}function t(a,d){d&&d.length&&g(a,A(d))}function P(a){for(var d={},c=0,b=a.length;c<b;c++){var k=a[c];d[k.name]=k.value}return d}function K(a){return a.replace(/&/g,"&").replace(Q,function(a){var c= 11004a.charCodeAt(0);a=a.charCodeAt(1);return"&#"+(1024*(c-55296)+(a-56320)+65536)+";"}).replace(u,function(a){return"&#"+a.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}function z(a){for(;a;){if(a.nodeType===s.Node.ELEMENT_NODE)for(var d=a.attributes,c=0,b=d.length;c<b;c++){var k=d[c],f=k.name.toLowerCase();if("xmlns:ns1"===f||0===f.lastIndexOf("ns1:",0))a.removeAttributeNode(k),c--,b--}(d=a.firstChild)&&z(d);a=v("nextSibling",a)}}function v(a,d){var c=d[a];if(c&&I.call(d,c))throw C("elclob", 11005d.outerHTML||d.outerText);return c}var y=!1,f=!1;this.$get=["$$sanitizeUri",function(a){y=!0;f&&g(m,l);return function(d){var c=[];J(d,B(c,function(b,c){return!/^unsafe:/.test(a(b,c))}));return c.join("")}}];this.enableSvg=function(a){return H(a)?(f=a,this):f};this.addValidElements=function(a){y||(G(a)&&(a={htmlElements:a}),t(l,a.svgElements),t(r,a.htmlVoidElements),t(m,a.htmlVoidElements),t(m,a.htmlElements));return this};this.addValidAttrs=function(a){y||g(L,A(a,!0));return this};E=e.bind;g=e.extend; 11006F=e.forEach;G=e.isArray;H=e.isDefined;q=e.$$lowercase;D=e.noop;J=function(a,d){null===a||void 0===a?a="":"string"!==typeof a&&(a=""+a);var c=M(a);if(!c)return"";var b=5;do{if(0===b)throw C("uinput");b--;a=c.innerHTML;c=M(a)}while(a!==c.innerHTML);for(b=c.firstChild;b;){switch(b.nodeType){case 1:d.start(b.nodeName.toLowerCase(),P(b.attributes));break;case 3:d.chars(b.textContent)}var k;if(!(k=b.firstChild)&&(1===b.nodeType&&d.end(b.nodeName.toLowerCase()),k=v("nextSibling",b),!k))for(;null==k;){b= 11007v("parentNode",b);if(b===c)break;k=v("nextSibling",b);1===b.nodeType&&d.end(b.nodeName.toLowerCase())}b=k}for(;b=c.firstChild;)c.removeChild(b)};B=function(a,d){var c=!1,b=E(a,a.push);return{start:function(a,f){a=q(a);!c&&w[a]&&(c=a);c||!0!==m[a]||(b("<"),b(a),F(f,function(c,f){var e=q(f),h="img"===a&&"src"===e||"background"===e;!0!==L[e]||!0===N[e]&&!d(c,h)||(b(" "),b(f),b('="'),b(K(c)),b('"'))}),b(">"))},end:function(a){a=q(a);c||!0!==m[a]||!0===r[a]||(b("</"),b(a),b(">"));a==c&&(c=!1)},chars:function(a){c|| 11008b(K(a))}}};I=s.Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&16)};var Q=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=/([^#-~ |!])/g,r=h("area,br,col,hr,img,wbr"),x=h("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),p=h("rp,rt"),n=g({},p,x),x=g({},x,h("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),p=g({},p,h("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")), 11009l=h("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),w=h("script,style"),m=g({},r,x,p,n),N=h("background,cite,href,longdesc,src,xlink:href,xml:base"),n=h("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"), 11010p=h("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan", 11011!0),L=g({},N,p,n),M=function(a,d){function c(b){b="<remove></remove>"+b;try{var c=(new a.DOMParser).parseFromString(b,"text/html").body;c.firstChild.remove();return c}catch(d){}}var b;try{b=!!c("")}catch(f){b=!1}if(b)return c;if(!d||!d.implementation)throw C("noinert");b=d.implementation.createHTMLDocument("inert");var e=(b.documentElement||b.getDocumentElement()).querySelector("body");return function(a){e.innerHTML=a;d.documentMode&&z(e);return e}}(s,s.document)}).info({angularVersion:"1.8.2"}); 11012e.module("ngSanitize").filter("linky",["$sanitize",function(h){var g=/((s?ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,t=/^mailto:/i,q=e.$$minErr("linky"),s=e.isDefined,z=e.isFunction,v=e.isObject,y=e.isString;return function(f,e,u){function r(e){e&&l.push(O(e))}function x(f,h){var g,a=p(f);l.push("<a ");for(g in a)l.push(g+'="'+a[g]+'" ');!s(e)||"target"in a||l.push('target="',e,'" ');l.push('href="',f.replace(/"/g,"""),'">');r(h);l.push("</a>")}if(null== 11013f||""===f)return f;if(!y(f))throw q("notstring",f);for(var p=z(u)?u:v(u)?function(){return u}:function(){return{}},n=f,l=[],w,m;f=n.match(g);)w=f[0],f[2]||f[4]||(w=(f[3]?"http://":"mailto:")+w),m=f.index,r(n.substr(0,m)),x(w,f[0].replace(t,"")),n=n.substring(m+f[0].length);r(n);return h(l.join(""))}}])})(window,window.angular); 11014//# sourceMappingURL=angular-sanitize.min.js.map 11015; 11016/** 11017 * @license AngularJS v1.8.2 11018 * (c) 2010-2020 Google LLC. http://angularjs.org 11019 * License: MIT 11020 */ 11021(function(window, angular) {'use strict'; 11022 11023var forEach; 11024var isArray; 11025var isString; 11026var jqLite; 11027 11028/** 11029 * @ngdoc module 11030 * @name ngMessages 11031 * @description 11032 * 11033 * The `ngMessages` module provides enhanced support for displaying messages within templates 11034 * (typically within forms or when rendering message objects that return key/value data). 11035 * Instead of relying on JavaScript code and/or complex ng-if statements within your form template to 11036 * show and hide error messages specific to the state of an input field, the `ngMessages` and 11037 * `ngMessage` directives are designed to handle the complexity, inheritance and priority 11038 * sequencing based on the order of how the messages are defined in the template. 11039 * 11040 * Currently, the ngMessages module only contains the code for the `ngMessages`, `ngMessagesInclude` 11041 * `ngMessage`, `ngMessageExp` and `ngMessageDefault` directives. 11042 * 11043 * ## Usage 11044 * The `ngMessages` directive allows keys in a key/value collection to be associated with a child element 11045 * (or 'message') that will show or hide based on the truthiness of that key's value in the collection. A common use 11046 * case for `ngMessages` is to display error messages for inputs using the `$error` object exposed by the 11047 * {@link ngModel ngModel} directive. 11048 * 11049 * The child elements of the `ngMessages` directive are matched to the collection keys by a `ngMessage` or 11050 * `ngMessageExp` directive. The value of these attributes must match a key in the collection that is provided by 11051 * the `ngMessages` directive. 11052 * 11053 * Consider the following example, which illustrates a typical use case of `ngMessages`. Within the form `myForm` we 11054 * have a text input named `myField` which is bound to the scope variable `field` using the {@link ngModel ngModel} 11055 * directive. 11056 * 11057 * The `myField` field is a required input of type `email` with a maximum length of 15 characters. 11058 * 11059 * ```html 11060 * <form name="myForm"> 11061 * <label> 11062 * Enter text: 11063 * <input type="email" ng-model="field" name="myField" required maxlength="15" /> 11064 * </label> 11065 * <div ng-messages="myForm.myField.$error" role="alert"> 11066 * <div ng-message="required">Please enter a value for this field.</div> 11067 * <div ng-message="email">This field must be a valid email address.</div> 11068 * <div ng-message="maxlength">This field can be at most 15 characters long.</div> 11069 * </div> 11070 * </form> 11071 * ``` 11072 * 11073 * In order to show error messages corresponding to `myField` we first create an element with an `ngMessages` attribute 11074 * set to the `$error` object owned by the `myField` input in our `myForm` form. 11075 * 11076 * Within this element we then create separate elements for each of the possible errors that `myField` could have. 11077 * The `ngMessage` attribute is used to declare which element(s) will appear for which error - for example, 11078 * setting `ng-message="required"` specifies that this particular element should be displayed when there 11079 * is no value present for the required field `myField` (because the key `required` will be `true` in the object 11080 * `myForm.myField.$error`). 11081 * 11082 * ### Message order 11083 * 11084 * By default, `ngMessages` will only display one message for a particular key/value collection at any time. If more 11085 * than one message (or error) key is currently true, then which message is shown is determined by the order of messages 11086 * in the HTML template code (messages declared first are prioritised). This mechanism means the developer does not have 11087 * to prioritize messages using custom JavaScript code. 11088 * 11089 * Given the following error object for our example (which informs us that the field `myField` currently has both the 11090 * `required` and `email` errors): 11091 * 11092 * ```javascript 11093 * <!-- keep in mind that ngModel automatically sets these error flags --> 11094 * myField.$error = { required : true, email: true, maxlength: false }; 11095 * ``` 11096 * The `required` message will be displayed to the user since it appears before the `email` message in the DOM. 11097 * Once the user types a single character, the `required` message will disappear (since the field now has a value) 11098 * but the `email` message will be visible because it is still applicable. 11099 * 11100 * ### Displaying multiple messages at the same time 11101 * 11102 * While `ngMessages` will by default only display one error element at a time, the `ng-messages-multiple` attribute can 11103 * be applied to the `ngMessages` container element to cause it to display all applicable error messages at once: 11104 * 11105 * ```html 11106 * <!-- attribute-style usage --> 11107 * <div ng-messages="myForm.myField.$error" ng-messages-multiple>...</div> 11108 * 11109 * <!-- element-style usage --> 11110 * <ng-messages for="myForm.myField.$error" multiple>...</ng-messages> 11111 * ``` 11112 * 11113 * ## Reusing and Overriding Messages 11114 * In addition to prioritization, ngMessages also allows for including messages from a remote or an inline 11115 * template. This allows for generic collection of messages to be reused across multiple parts of an 11116 * application. 11117 * 11118 * ```html 11119 * <script type="text/ng-template" id="error-messages"> 11120 * <div ng-message="required">This field is required</div> 11121 * <div ng-message="minlength">This field is too short</div> 11122 * </script> 11123 * 11124 * <div ng-messages="myForm.myField.$error" role="alert"> 11125 * <div ng-messages-include="error-messages"></div> 11126 * </div> 11127 * ``` 11128 * 11129 * However, including generic messages may not be useful enough to match all input fields, therefore, 11130 * `ngMessages` provides the ability to override messages defined in the remote template by redefining 11131 * them within the directive container. 11132 * 11133 * ```html 11134 * <!-- a generic template of error messages known as "my-custom-messages" --> 11135 * <script type="text/ng-template" id="my-custom-messages"> 11136 * <div ng-message="required">This field is required</div> 11137 * <div ng-message="minlength">This field is too short</div> 11138 * </script> 11139 * 11140 * <form name="myForm"> 11141 * <label> 11142 * Email address 11143 * <input type="email" 11144 * id="email" 11145 * name="myEmail" 11146 * ng-model="email" 11147 * minlength="5" 11148 * required /> 11149 * </label> 11150 * <!-- any ng-message elements that appear BEFORE the ng-messages-include will 11151 * override the messages present in the ng-messages-include template --> 11152 * <div ng-messages="myForm.myEmail.$error" role="alert"> 11153 * <!-- this required message has overridden the template message --> 11154 * <div ng-message="required">You did not enter your email address</div> 11155 * 11156 * <!-- this is a brand new message and will appear last in the prioritization --> 11157 * <div ng-message="email">
11157Your email address is invalid</div> 11158 * 11159 * <!-- and here are the generic error messages --> 11160 * <div ng-messages-include="my-custom-messages"></div> 11161 * </div> 11162 * </form> 11163 * ``` 11164 * 11165 * In the example HTML code above the message that is set on required will override the corresponding 11166 * required message defined within the remote template. Therefore, with particular input fields (such 11167 * email addresses, date fields, autocomplete inputs, etc...), specialized error messages can be applied 11168 * while more generic messages can be used to handle other, more general input errors. 11169 * 11170 * ## Dynamic Messaging 11171 * ngMessages also supports using expressions to dynamically change key values. Using arrays and 11172 * repeaters to list messages is also supported. This means that the code below will be able to 11173 * fully adapt itself and display the appropriate message when any of the expression data changes: 11174 * 11175 * ```html 11176 * <form name="myForm"> 11177 * <label> 11178 * Email address 11179 * <input type="email" 11180 * name="myEmail" 11181 * ng-model="email" 11182 * minlength="5" 11183 * required /> 11184 * </label> 11185 * <div ng-messages="myForm.myEmail.$error" role="alert"> 11186 * <div ng-message="required">You did not enter your email address</div> 11187 * <div ng-repeat="errorMessage in errorMessages"> 11188 * <!-- use ng-message-exp for a message whose key is given by an expression --> 11189 * <div ng-message-exp="errorMessage.type">{{ errorMessage.text }}</div> 11190 * </div> 11191 * </div> 11192 * </form> 11193 * ``` 11194 * 11195 * The `errorMessage.type` expression can be a string value or it can be an array so 11196 * that multiple errors can be associated with a single error message: 11197 * 11198 * ```html 11199 * <label> 11200 * Email address 11201 * <input type="email" 11202 * ng-model="data.email" 11203 * name="myEmail" 11204 * ng-minlength="5" 11205 * ng-maxlength="100" 11206 * required /> 11207 * </label> 11208 * <div ng-messages="myForm.myEmail.$error" role="alert"> 11209 * <div ng-message-exp="'required'">You did not enter your email address</div> 11210 * <div ng-message-exp="['minlength', 'maxlength']"> 11211 * Your email must be between 5 and 100 characters long 11212 * </div> 11213 * </div> 11214 * ``` 11215 * 11216 * Feel free to use other structural directives such as ng-if and ng-switch to further control 11217 * what messages are active and when. Be careful, if you place ng-message on the same element 11218 * as these structural directives, AngularJS may not be able to determine if a message is active 11219 * or not. Therefore it is best to place the ng-message on a child element of the structural 11220 * directive. 11221 * 11222 * ```html 11223 * <div ng-messages="myForm.myEmail.$error" role="alert"> 11224 * <div ng-if="showRequiredError"> 11225 * <div ng-message="required">Please enter something</div> 11226 * </div> 11227 * </div> 11228 * ``` 11229 * 11230 * ## Animations 11231 * If the `ngAnimate` module is active within the application then the `ngMessages`, `ngMessage` and 11232 * `ngMessageExp` directives will trigger animations whenever any messages are added and removed from 11233 * the DOM by the `ngMessages` directive. 11234 * 11235 * Whenever the `ngMessages` directive contains one or more visible messages then the `.ng-active` CSS 11236 * class will be added to the element. The `.ng-inactive` CSS class will be applied when there are no 11237 * messages present. Therefore, CSS transitions and keyframes as well as JavaScript animations can 11238 * hook into the animations whenever these classes are added/removed. 11239 * 11240 * Let's say that our HTML code for our messages container looks like so: 11241 * 11242 * ```html 11243 * <div ng-messages="myMessages" class="my-messages" role="alert"> 11244 * <div ng-message="alert" class="some-message">...</div> 11245 * <div ng-message="fail" class="some-message">...</div> 11246 * </div> 11247 * ``` 11248 * 11249 * Then the CSS animation code for the message container looks like so: 11250 * 11251 * ```css 11252 * .my-messages { 11253 * transition:1s linear all; 11254 * } 11255 * .my-messages.ng-active { 11256 * // messages are visible 11257 * } 11258 * .my-messages.ng-inactive { 11259 * // messages are hidden 11260 * } 11261 * ``` 11262 * 11263 * Whenever an inner message is attached (becomes visible) or removed (becomes hidden) then the enter 11264 * and leave animation is triggered for each particular element bound to the `ngMessage` directive. 11265 * 11266 * Therefore, the CSS code for the inner messages looks like so: 11267 * 11268 * ```css 11269 * .some-message { 11270 * transition:1s linear all; 11271 * } 11272 * 11273 * .some-message.ng-enter {} 11274 * .some-message.ng-enter.ng-enter-active {} 11275 * 11276 * .some-message.ng-leave {} 11277 * .some-message.ng-leave.ng-leave-active {} 11278 * ``` 11279 * 11280 * {@link ngAnimate See the ngAnimate docs} to learn how to use JavaScript animations or to learn 11281 * more about ngAnimate. 11282 * 11283 * ## Displaying a default message 11284 * If the ngMessages renders no inner ngMessage directive (i.e. when none of the truthy 11285 * keys are matched by a defined message), then it will render a default message 11286 * using the {@link ngMessageDefault} directive. 11287 * Note that matched messages will always take precedence over unmatched messages. That means 11288 * the default message will not be displayed when another message is matched. This is also 11289 * true for `ng-messages-multiple`. 11290 * 11291 * ```html 11292 * <div ng-messages="myForm.myField.$error" role="alert"> 11293 * <div ng-message="required">This field is required</div> 11294 * <div ng-message="minlength">This field is too short</div> 11295 * <div ng-message-default>This field has an input error</div> 11296 * </div> 11297 * ``` 11298 * 11299 11300 */ 11301angular.module('ngMessages', [], function initAngularHelpers() { 11302 // Access helpers from AngularJS core. 11303 // Do it inside a `config` block to ensure `window.angular` is available. 11304 forEach = angular.forEach; 11305 isArray = angular.isArray; 11306 isString = angular.isString; 11307 jqLite = angular.element; 11308}) 11309 .info({ angularVersion: '1.8.2
vendor: 19,108 bytes, lines 11309-11844
11309' }) 11310 11311 /** 11312 * @ngdoc directive 11313 * @module ngMessages 11314 * @name ngMessages 11315 * @restrict AE 11316 * 11317 * @description 11318 * `ngMessages` is a directive that is designed to show and hide messages based on the state 11319 * of a key/value object that it listens on. The directive itself complements error message 11320 * reporting with the `ngModel` $error object (which stores a key/value state of validation errors). 11321 * 11322 * `ngMessages` manages the state of internal messages within its container element. The internal 11323 * messages use the `ngMessage` directive and will be inserted/removed from the page depending 11324 * on if they're present within the key/value object. By default, only one message will be displayed 11325 * at a time and this depends on the prioritization of the messages within the template. (This can 11326 * be changed by using the `ng-messages-multiple` or `multiple` attribute on the directive container.) 11327 * 11328 * A remote template can also be used (With {@link ngMessagesInclude}) to promote message 11329 * reusability and messages can also be overridden. 11330 * 11331 * A default message can also be displayed when no `ngMessage` directive is inserted, using the 11332 * {@link ngMessageDefault} directive. 11333 * 11334 * {@link module:ngMessages Click here} to learn more about `ngMessages` and `ngMessage`. 11335 * 11336 * @usage 11337 * ```html 11338 * <!-- using attribute directives --> 11339 * <ANY ng-messages="expression" role="alert"> 11340 * <ANY ng-message="stringValue">...</ANY> 11341 * <ANY ng-message="stringValue1, stringValue2, ...">...</ANY> 11342 * <ANY ng-message-exp="expressionValue">...</ANY> 11343 * <ANY ng-message-default>...</ANY> 11344 * </ANY> 11345 * 11346 * <!-- or by using element directives --> 11347 * <ng-messages for="expression" role="alert"> 11348 * <ng-message when="stringValue">...</ng-message> 11349 * <ng-message when="stringValue1, stringValue2, ...">...</ng-message> 11350 * <ng-message when-exp="expressionValue">...</ng-message> 11351 * <ng-message-default>...</ng-message-default> 11352 * </ng-messages> 11353 * ``` 11354 * 11355 * @param {string} ngMessages an AngularJS expression evaluating to a key/value object 11356 * (this is typically the $error object on an ngModel instance). 11357 * @param {string=} ngMessagesMultiple|multiple when set, all messages will be displayed with true 11358 * 11359 * @example 11360 * <example name="ngMessages-directive" module="ngMessagesExample" 11361 * deps="angular-messages.js" 11362 * animations="true" fixBase="true"> 11363 * <file name="index.html"> 11364 * <form name="myForm"> 11365 * <label> 11366 * Enter your name: 11367 * <input type="text" 11368 * name="myName" 11369 * ng-model="name" 11370 * ng-minlength="5" 11371 * ng-maxlength="20" 11372 * required /> 11373 * </label> 11374 * <pre>myForm.myName.$error = {{ myForm.myName.$error | json }}</pre> 11375 * 11376 * <div ng-messages="myForm.myName.$error" style="color:maroon" role="alert"> 11377 * <div ng-message="required">You did not enter a field</div> 11378 * <div ng-message="minlength">Your field is too short</div> 11379 * <div ng-message="maxlength">Your field is too long</div> 11380 * <div ng-message-default>This field has an input error</div> 11381 * </div> 11382 * </form> 11383 * </file> 11384 * <file name="script.js"> 11385 * angular.module('ngMessagesExample', ['ngMessages']); 11386 * </file> 11387 * </example> 11388 */ 11389 .directive('ngMessages', ['$animate', function($animate) { 11390 var ACTIVE_CLASS = 'ng-active'; 11391 var INACTIVE_CLASS = 'ng-inactive'; 11392 11393 return { 11394 require: 'ngMessages', 11395 restrict: 'AE', 11396 controller: ['$element', '$scope', '$attrs', function NgMessagesCtrl($element, $scope, $attrs) { 11397 var ctrl = this; 11398 var latestKey = 0; 11399 var nextAttachId = 0; 11400 11401 this.getAttachId = function getAttachId() { return nextAttachId++; }; 11402 11403 var messages = this.messages = {}; 11404 var renderLater, cachedCollection; 11405 11406 this.render = function(collection) { 11407 collection = collection || {}; 11408 11409 renderLater = false; 11410 cachedCollection = collection; 11411 11412 // this is true if the attribute is empty or if the attribute value is truthy 11413 var multiple = isAttrTruthy($scope, $attrs.ngMessagesMultiple) || 11414 isAttrTruthy($scope, $attrs.multiple); 11415 11416 var unmatchedMessages = []; 11417 var matchedKeys = {}; 11418 var truthyKeys = 0; 11419 var messageItem = ctrl.head; 11420 var messageFound = false; 11421 var totalMessages = 0; 11422 11423 // we use != instead of !== to allow for both undefined and null values 11424 while (messageItem != null) { 11425 totalMessages++; 11426 var messageCtrl = messageItem.message; 11427 11428 var messageUsed = false; 11429 if (!messageFound) { 11430 forEach(collection, function(value, key) { 11431 if (truthy(value) && !messageUsed) { 11432 truthyKeys++; 11433 11434 if (messageCtrl.test(key)) { 11435 // this is to prevent the same error name from showing up twice 11436 if (matchedKeys[key]) return; 11437 matchedKeys[key] = true; 11438 11439 messageUsed = true; 11440 messageCtrl.attach(); 11441 } 11442 } 11443 }); 11444 } 11445 11446 if (messageUsed) { 11447 // unless we want to display multiple messages then we should 11448 // set a flag here to avoid displaying the next message in the list 11449 messageFound = !multiple; 11450 } else { 11451 unmatchedMessages.push(messageCtrl); 11452 } 11453 11454 messageItem = messageItem.next; 11455 } 11456 11457 forEach(unmatchedMessages, function(messageCtrl) { 11458 messageCtrl.detach(); 11459 }); 11460 11461 var messageMatched = unmatchedMessages.length !== totalMessages; 11462 var attachDefault = ctrl.default && !messageMatched && truthyKeys > 0; 11463 11464 if (attachDefault) { 11465 ctrl.default.attach(); 11466 } else if (ctrl.default) { 11467 ctrl.default.detach(); 11468 } 11469 11470 if (messageMatched || attachDefault) { 11471 $animate.setClass($element, ACTIVE_CLASS, INACTIVE_CLASS); 11472 } else { 11473 $animate.setClass($element, INACTIVE_CLASS, ACTIVE_CLASS); 11474 } 11475 }; 11476 11477 $scope.$watchCollection($attrs.ngMessages || $attrs['for'], ctrl.render); 11478 11479 this.reRender = function() { 11480 if (!renderLater) { 11481 renderLater = true; 11482 $scope.$evalAsync(function() { 11483 if (renderLater && cachedCollection) { 11484 ctrl.render(cachedCollection); 11485 } 11486 }); 11487 } 11488 }; 11489 11490 this.register = function(comment, messageCtrl, isDefault) { 11491 if (isDefault) { 11492 ctrl.default = messageCtrl; 11493 } else { 11494 var nextKey = latestKey.toString(); 11495 messages[nextKey] = { 11496 message: messageCtrl 11497 }; 11498 insertMessageNode($element[0], comment, nextKey); 11499 comment.$$ngMessageNode = nextKey; 11500 latestKey++; 11501 } 11502 11503 ctrl.reRender(); 11504 }; 11505 11506 this.deregister = function(comment, isDefault) { 11507 if (isDefault) { 11508 delete ctrl.default; 11509 } else { 11510 var key = comment.$$ngMessageNode; 11511 delete comment.$$ngMessageNode; 11512 removeMessageNode($element[0], comment, key); 11513 delete messages[key]; 11514 } 11515 ctrl.reRender(); 11516 }; 11517 11518 function findPreviousMessage(parent, comment) { 11519 var prevNode = comment; 11520 var parentLookup = []; 11521 11522 while (prevNode && prevNode !== parent) { 11523 var prevKey = prevNode.$$ngMessageNode; 11524 if (prevKey && prevKey.length) { 11525 return messages[prevKey]; 11526 } 11527 11528 // dive deeper into the DOM and examine its children for any ngMessage 11529 // comments that may be in an element that appears deeper in the list 11530 if (prevNode.childNodes.length && parentLookup.indexOf(prevNode) === -1) { 11531 parentLookup.push(prevNode); 11532 prevNode = prevNode.childNodes[prevNode.childNodes.length - 1]; 11533 } else if (prevNode.previousSibling) { 11534 prevNode = prevNode.previousSibling; 11535 } else { 11536 prevNode = prevNode.parentNode; 11537 parentLookup.push(prevNode); 11538 } 11539 } 11540 } 11541 11542 function insertMessageNode(parent, comment, key) { 11543 var messageNode = messages[key]; 11544 if (!ctrl.head) { 11545 ctrl.head = messageNode; 11546 } else { 11547 var match = findPreviousMessage(parent, comment); 11548 if (match) { 11549 messageNode.next = match.next; 11550 match.next = messageNode; 11551 } else { 11552 messageNode.next = ctrl.head; 11553 ctrl.head = messageNode; 11554 } 11555 } 11556 } 11557 11558 function removeMessageNode(parent, comment, key) { 11559 var messageNode = messages[key]; 11560 11561 // This message node may have already been removed by a call to deregister() 11562 if (!messageNode) return; 11563 11564 var match = findPreviousMessage(parent, comment); 11565 if (match) { 11566 match.next = messageNode.next; 11567 } else { 11568 ctrl.head = messageNode.next; 11569 } 11570 } 11571 }] 11572 }; 11573 11574 function isAttrTruthy(scope, attr) { 11575 return (isString(attr) && attr.length === 0) || //empty attribute 11576 truthy(scope.$eval(attr)); 11577 } 11578 11579 function truthy(val) { 11580 return isString(val) ? val.length : !!val; 11581 } 11582 }]) 11583 11584 /** 11585 * @ngdoc directive 11586 * @name ngMessagesInclude 11587 * @restrict AE 11588 * @scope 11589 * 11590 * @description 11591 * `ngMessagesInclude` is a directive with the purpose to import existing ngMessage template 11592 * code from a remote template and place the downloaded template code into the exact spot 11593 * that the ngMessagesInclude directive is placed within the ngMessages container. This allows 11594 * for a series of pre-defined messages to be reused and also allows for the developer to 11595 * determine what messages are overridden due to the placement of the ngMessagesInclude directive. 11596 * 11597 * @usage 11598 * ```html 11599 * <!-- using attribute directives --> 11600 * <ANY ng-messages="expression" role="alert"> 11601 * <ANY ng-messages-include="remoteTplString">...</ANY> 11602 * </ANY> 11603 * 11604 * <!-- or by using element directives --> 11605 * <ng-messages for="expression" role="alert"> 11606 * <ng-messages-include src="expressionValue1">...</ng-messages-include> 11607 * </ng-messages> 11608 * ``` 11609 * 11610 * {@link module:ngMessages Click here} to learn more about `ngMessages` and `ngMessage`. 11611 * 11612 * @param {string} ngMessagesInclude|src a string value corresponding to the remote template. 11613 */ 11614 .directive('ngMessagesInclude', 11615 ['$templateRequest', '$document', '$compile', function($templateRequest, $document, $compile) { 11616 11617 return { 11618 restrict: 'AE', 11619 require: '^^ngMessages', // we only require this for validation sake 11620 link: function($scope, element, attrs) { 11621 var src = attrs.ngMessagesInclude || attrs.src; 11622 $templateRequest(src).then(function(html) { 11623 if ($scope.$$destroyed) return; 11624 11625 if (isString(html) && !html.trim()) { 11626 // Empty template - nothing to compile 11627 replaceElementWithMarker(element, src); 11628 } else { 11629 // Non-empty template - compile and link 11630 $compile(html)($scope, function(contents) { 11631 element.after(contents); 11632 replaceElementWithMarker(element, src); 11633 }); 11634 } 11635 }); 11636 } 11637 }; 11638 11639 // Helpers 11640 function replaceElementWithMarker(element, src) { 11641 // A comment marker is placed for debugging purposes 11642 var comment = $compile.$$createComment ? 11643 $compile.$$createComment('ngMessagesInclude', src) : 11644 $document[0].createComment(' ngMessagesInclude: ' + src + ' '); 11645 var marker = jqLite(comment); 11646 element.after(marker); 11647 11648 // Don't pollute the DOM anymore by keeping an empty directive element 11649 element.remove(); 11650 } 11651 }]) 11652 11653 /** 11654 * @ngdoc directive 11655 * @name ngMessage 11656 * @restrict AE 11657 * @scope 11658 * @priority 1 11659 * 11660 * @description 11661 * `ngMessage` is a directive with the purpose to show and hide a particular message. 11662 * For `ngMessage` to operate, a parent `ngMessages` directive on a parent DOM element 11663 * must be situated since it determines which messages are visible based on the state 11664 * of the provided key/value map that `ngMessages` listens on. 11665 * 11666 * More information about using `ngMessage` can be found in the 11667 * {@link module:ngMessages `ngMessages` module documentation}. 11668 * 11669 * @usage 11670 * ```html 11671 * <!-- using attribute directives --> 11672 * <ANY ng-messages="expression" role="alert"> 11673 * <ANY ng-message="stringValue">...</ANY> 11674 * <ANY ng-message="stringValue1, stringValue2, ...">...</ANY> 11675 * </ANY> 11676 * 11677 * <!-- or by using element directives --> 11678 * <ng-messages for="expression" role="alert"> 11679 * <ng-message when="stringValue">...</ng-message> 11680 * <ng-message when="stringValue1, stringValue2, ...">...</ng-message> 11681 * </ng-messages> 11682 * ``` 11683 * 11684 * @param {expression} ngMessage|when a string value corresponding to the message key. 11685 */ 11686 .directive('ngMessage', ngMessageDirectiveFactory()) 11687 11688 11689 /** 11690 * @ngdoc directive 11691 * @name ngMessageExp 11692 * @restrict AE 11693 * @priority 1 11694 * @scope 11695 * 11696 * @description 11697 * `ngMessageExp` is the same as {@link directive:ngMessage `ngMessage`}, but instead of a static 11698 * value, it accepts an expression to be evaluated for the message key. 11699 * 11700 * @usage 11701 * ```html 11702 * <!-- using attribute directives --> 11703 * <ANY ng-messages="expression"> 11704 * <ANY ng-message-exp="expressionValue">...</ANY> 11705 * </ANY> 11706 * 11707 * <!-- or by using element directives --> 11708 * <ng-messages for="expression"> 11709 * <ng-message when-exp="expressionValue">...</ng-message> 11710 * </ng-messages> 11711 * ``` 11712 * 11713 * {@link module:ngMessages Click here} to learn more about `ngMessages` and `ngMessage`. 11714 * 11715 * @param {expression} ngMessageExp|whenExp an expression value corresponding to the message key. 11716 */ 11717 .directive('ngMessageExp', ngMessageDirectiveFactory()) 11718 11719 /** 11720 * @ngdoc directive 11721 * @name ngMessageDefault 11722 * @restrict AE 11723 * @scope 11724 * 11725 * @description 11726 * `ngMessageDefault` is a directive with the purpose to show and hide a default message for 11727 * {@link directive:ngMessages}, when none of provided messages matches. 11728 * 11729 * More information about using `ngMessageDefault` can be found in the 11730 * {@link module:ngMessages `ngMessages` module documentation}. 11731 * 11732 * @usage 11733 * ```html 11734 * <!-- using attribute directives --> 11735 * <ANY ng-messages="expression" role="alert"> 11736 * <ANY ng-message="stringValue">...</ANY> 11737 * <ANY ng-message="stringValue1, stringValue2, ...">...</ANY> 11738 * <ANY ng-message-default>...</ANY> 11739 * </ANY> 11740 * 11741 * <!-- or by using element directives --> 11742 * <ng-messages for="expression" role="alert"> 11743 * <ng-message when="stringValue">...</ng-message> 11744 * <ng-message when="stringValue1, stringValue2, ...">...</ng-message> 11745 * <ng-message-default>...</ng-message-default> 11746 * </ng-messages> 11747 * 11748 */ 11749 .directive('ngMessageDefault', ngMessageDirectiveFactory(true)); 11750 11751function ngMessageDirectiveFactory(isDefault) { 11752 return ['$animate', function($animate) { 11753 return { 11754 restrict: 'AE', 11755 transclude: 'element', 11756 priority: 1, // must run before ngBind, otherwise the text is set on the comment 11757 terminal: true, 11758 require: '^^ngMessages', 11759 link: function(scope, element, attrs, ngMessagesCtrl, $transclude) { 11760 var commentNode, records, staticExp, dynamicExp; 11761 11762 if (!isDefault) { 11763 commentNode = element[0]; 11764 staticExp = attrs.ngMessage || attrs.when; 11765 dynamicExp = attrs.ngMessageExp || attrs.whenExp; 11766 11767 var assignRecords = function(items) { 11768 records = items 11769 ? (isArray(items) 11770 ? items 11771 : items.split(/[\s,]+/)) 11772 : null; 11773 ngMessagesCtrl.reRender(); 11774 }; 11775 11776 if (dynamicExp) { 11777 assignRecords(scope.$eval(dynamicExp)); 11778 scope.$watchCollection(dynamicExp, assignRecords); 11779 } else { 11780 assignRecords(staticExp); 11781 } 11782 } 11783 11784 var currentElement, messageCtrl; 11785 ngMessagesCtrl.register(commentNode, messageCtrl = { 11786 test: function(name) { 11787 return contains(records, name); 11788 }, 11789 attach: function() { 11790 if (!currentElement) { 11791 $transclude(function(elm, newScope) { 11792 $animate.enter(elm, null, element); 11793 currentElement = elm; 11794 11795 // Each time we attach this node to a message we get a new id that we can match 11796 // when we are destroying the node later. 11797 var $$attachId = currentElement.$$attachId = ngMessagesCtrl.getAttachId(); 11798 11799 // in the event that the element or a parent element is destroyed 11800 // by another structural directive then it's time 11801 // to deregister the message from the controller 11802 currentElement.on('$destroy', function() { 11803 // If the message element was removed via a call to `detach` then `currentElement` will be null 11804 // So this handler only handles cases where something else removed the message element. 11805 if (currentElement && currentElement.$$attachId === $$attachId) { 11806 ngMessagesCtrl.deregister(commentNode, isDefault); 11807 messageCtrl.detach(); 11808 } 11809 newScope.$destroy(); 11810 }); 11811 }); 11812 } 11813 }, 11814 detach: function() { 11815 if (currentElement) { 11816 var elm = currentElement; 11817 currentElement = null; 11818 $animate.leave(elm); 11819 } 11820 } 11821 }, isDefault); 11822 11823 // We need to ensure that this directive deregisters itself when it no longer exists 11824 // Normally this is done when the attached element is destroyed; but if this directive 11825 // gets removed before we attach the message to the DOM there is nothing to watch 11826 // in which case we must deregister when the containing scope is destroyed. 11827 scope.$on('$destroy', function() { 11828 ngMessagesCtrl.deregister(commentNode, isDefault); 11829 }); 11830 } 11831 }; 11832 }]; 11833 11834 function contains(collection, key) { 11835 if (collection) { 11836 return isArray(collection) 11837 ? collection.indexOf(key) >= 0 11838 : collection.hasOwnProperty(key); 11839 } 11840 } 11841} 11842 11843 11844})(window, window.angular);
11845; 11846angular.module("payment", ["payment.service", "payment.restrictNumeric", "payment.cardCvc", "payment.cardExpiry", "payment.cardNumber"]); 11847/*global angular: false */ 11848angular.module('payment.service', []) 11849 .factory('payment', ['$document', function ($document) { 11850 'use strict'; 11851 11852 var defaultFormat = /(\d{1,4})/g, 11853 cards = [ 11854 { //visa 11855 type: 'V', 11856 pattern: /^4/, 11857 format: defaultFormat, 11858 length: [13, 14, 15, 16], 11859 cvcLength: [3], 11860 luhn: true 11861 }, { //mastercard 11862 type: 'M', 11863 pattern: /^5[1-5]/, 11864 format: defaultFormat, 11865 length: [16], 11866 cvcLength: [3], 11867 luhn: true 11868 }, { //amex 11869 type: 'A', 11870 pattern: /^3[47]/, 11871 format: /(\d{1,4})(\d{1,6})?(\d{1,5})?/, 11872 length: [15], 11873 cvcLength: [3, 4], 11874 luhn: true 11875 }, { //discover 11876 type: 'D', 11877 pattern: /^(60|65|64[4-9]|62|81)/, 11878 format: defaultFormat, 11879 length: [16], 11880 cvcLength: [3], 11881 luhn: true 11882 } 11883 ], 11884 trim = function (str) { 11885 return str.toString().replace(/^\s+|\s+$/g, ''); 11886 }, 11887 hasTextSelected = function (elm) { 11888 var ref; 11889 if ((elm.prop('selectionStart') != null) && elm.prop('selectionStart') !== elm.prop('selectionEnd')) { return true; } 11890 return $document !== undefined && $document !== null ? (ref = $document.selection) != null ? typeof ref.createRange === "function" ? ref.createRange().text : undefined : undefined : undefined; 11891 }, 11892 cardFromNumber = function (num) { 11893 var card, i, len; 11894 if (!num) { return null; } 11895 num = num.toString().replace(/\D/g, ''); 11896 for (i = 0, len = cards.length; i < len; i++) { 11897 card = cards[i]; 11898 if (card.pattern.test(num)) { return card; } 11899 } 11900 11901 return null; 11902 }, 11903 luhnCheck = function (num) { 11904 var digit, digits = num.toString().split('').reverse(), sum = 0, i, odd = true; 11905 for (i = 0; i < digits.length; i++) { 11906 digit = digits[i]; 11907 digit = parseInt(digit, 10); 11908 if ((odd = !odd)) { digit *= 2; } 11909 if (digit > 9) { digit -= 9; } 11910 sum += digit; 11911 } 11912 11913 return sum % 10 === 0; 11914 }, 11915 validateCardNumber = function (num) { 11916 if (!num) { return false; } 11917 11918 var card; 11919 num = num.toString().replace(/\s+|-/g, ''); 11920 if (!/^\d+$/.test(num)) { return false; } 11921 card = cardFromNumber(num); 11922 11923 return card ? (card.length.indexOf(num.length) >= 0) && (card.luhn === false || luhnCheck(num)) : false; 11924 }, 11925 formatCardNumber = function (num) { 11926 var card = cardFromNumber(num), groups, upperLength, ref, result; 11927 if (!card) { return num; } 11928 upperLength = card.length[card.length.length - 1]; 11929 num = num.replace(/\D/g, ''); 11930 num = num.slice(0, +upperLength + 1 || 9e9); 11931 if (card.format.global) { 11932 result = (ref = num.match(card.format)) !== null ? ref.join(' ') : undefined; 11933 } else { 11934 groups = card.format.exec(num); 11935 if (groups !== null) { groups.shift(); } 11936 result = groups !== null ? groups.join(' ') : undefined; 11937 } 11938 11939 return result; 11940 }, 11941 validateCardExpiry = function (month, year) { 11942 var currentTime, expiry, prefix;
11943 if (typeof month === 'object' && month.hasOwnProperty('month')) { 11944 year = month.year; 11945 month = month.month; 11946 } 11947 11948 if (!(month && year)) { return false; } 11949 11950 month = trim(month); 11951 year = trim(year); 11952 if (!/^\d+$/.test(month)) { return false; } 11953 if (!/^\d+$/.test(year)) { return false; } 11954 if (!(parseInt(month, 10) <= 12)) { return false; } 11955 if (year.length === 2) { 11956 prefix = (new Date()).getFullYear(); 11957 prefix = prefix.toString().slice(0, 2); 11958 year = prefix + year; 11959 } 11960 11961 expiry = new Date(year, month); 11962 currentTime = new Date(); 11963 expiry.setMonth(expiry.getMonth() - 1); 11964 expiry.setMonth(expiry.getMonth() + 1, 1); 11965 11966 return expiry > currentTime; 11967 }, 11968 cardFromType = function (type) { 11969 var i; 11970 for (i = 0; i < cards.length; i++) { 11971 if (cards[i].type === type) { return cards[i]; } 11972 } 11973 11974 return undefined; 11975 }, 11976 validateCardCVC = function (cvc, type) { 11977 var card; 11978 cvc = trim(cvc); 11979 if (!/^\d+$/.test(cvc)) { return false; } 11980 if (type) { 11981 card = cardFromType(type); 11982 return card ? card.cvcLength.indexOf(cvc.length) >= 0 : false; 11983 } 11984 11985 return cvc.length >= 3 && cvc.length <= 4; 11986 }; 11987 11988 return { 11989 hasTextSelected: hasTextSelected, 11990 cardFromNumber: cardFromNumber, 11991 validateCardNumber: validateCardNumber, 11992 validateCardExpiry: validateCardExpiry, 11993 validateCardCvc: validateCardCVC, 11994 formatCardNumber: formatCardNumber 11995 }; 11996 }]); 11997angular.module('payment.restrictNumeric', []) 11998 .directive('restrictNumeric', function () { 11999 'use strict'; 12000 var restrictNumeric = function (e) { 12001 if (e.metaKey || e.ctrlKey || e.which === 0 || e.which < 33) { return; } 12002 if (e.which === 32 || !!/[\d\s]/.test(String.fromCharCode(e.which)) === false) { e.preventDefault(); } 12003 }; 12004 12005 return { 12006 restrict: 'A', 12007 link: function postLink(scope, element) { 12008 element.bind('keypress', restrictNumeric); 12009 } 12010 }; 12011 }); 12012/*global angular: false */ 12013angular.module('payment.cardCvc', ['payment.service', 'payment.restrictNumeric']) 12014 .directive('cardCvcInput', function () { 12015 'use strict'; 12016 return { 12017 restrict: 'E', 12018 templateUrl: 'template/cardCvc/cardCvc.html', 12019 replace: true 12020 }; 12021 }) 12022 12023 .directive('cardCvcFormatter', function () { 12024 'use strict'; 12025 var restrictCvc = function (e) { 12026 var elm = angular.element(e.currentTarget), digit, val; 12027 digit = String.fromCharCode(e.which); 12028 if (!/^\d+$/.test(digit)) { return; } 12029 12030 val = elm.val() + digit; 12031 if (val.length > 4) { e.preventDefault(); } 12032 }; 12033 12034 return { 12035 link: function postLink(scope, element) { 12036 element.bind('keypress', restrictCvc); 12037 } 12038 }; 12039 }) 12040 12041 .directive('cardCvcValidator', ['payment', function (payment) { 12042 'use strict'; 12043 return { 12044 require: 'ngModel', 12045 link: function (scope, elm, attrs, ngModelCtrl) { 12046 function validate(value) { 12047 var valid = value ? payment.validateCardCvc(value) : false; 12048 ngModelCtrl.$setValidity('cardCvc', valid); 12049 return valid; 12050 } 12051 12052 ngModelCtrl.$parsers.unshift(function (value) { 12053 return validate(value) ? value : undefined; 12054 }); 12055 12056 ngModelCtrl.$formatters.unshift(function (value) { 12057 validate(value); 12058 }); 12059 } 12060 }; 12061 }]); 12062/*global angular: false */ 12063angular.module('payment.cardExpiry', ['payment.service', 'payment.restrictNumeric']) 12064 .directive('cardExpiryInput', ['payment', function (payment) { 12065 'use strict'; 12066 return { 12067 restrict: 'E', 12068 templateUrl: 'template/cardExpiry/cardExpiry.html',
12069 replace: true 12070 }; 12071 }]) 12072 12073 .directive('cardExpiryFormatter', ['payment', function (payment) { 12074 'use strict'; 12075 var formatExpiry = function (e) { 12076 var elm, digit, val; 12077 12078 digit = String.fromCharCode(e.which); 12079 if (!/^\d+$/.test(digit)) { return; } 12080 elm = angular.element(e.currentTarget); 12081 val = elm.val() + digit; 12082 if (/^\d$/.test(val) && (val !== '0' && val !== '1')) { 12083 e.preventDefault(); 12084 elm.val('0' + val + ' / '); 12085 } else if (/^\d\d$/.test(val)) { 12086 e.preventDefault(); 12087 elm.val(val + ' / '); 12088 } 12089 }, 12090 formatForwardExpiry = function (e) { 12091 var elm, digit, val; 12092 12093 digit = String.fromCharCode(e.which); 12094 if (!/^\d+$/.test(digit)) { return; } 12095 elm = angular.element(e.currentTarget); 12096 val = elm.val(); 12097 if (/^\d\d$/.test(val)) { elm.val(val + ' / '); } 12098 }, 12099 formatForwardSlash = function (e) { 12100 var elm, slash, val; 12101 12102 slash = String.fromCharCode(e.which); 12103 if (slash !== '/') { return; } 12104 elm = angular.element(e.currentTarget); 12105 val = elm.val(); 12106 if (/^\d$/.test(val) && val !== '0') { elm.val(val + " / "); } 12107 }, 12108 formatBackExpiry = function (e) { 12109 var elm, value; 12110 12111 if (e.meta) { return; } 12112 elm = angular.element(e.currentTarget); 12113 value = elm.val(); 12114 if (e.which !== 8) { return; } 12115 if ((elm.prop('selectionStart') != null) && elm.prop('selectionStart') !== value.length) { return; } 12116 if (/\d(\s|\/)+$/.test(value)) { 12117 e.preventDefault(); 12118 elm.val(value.replace(/\d(\s|\/)*$/, '')); 12119 } else if (/\s\/\s?\d?$/.test(value)) { 12120 e.preventDefault(); 12121 elm.val(value.replace(/\s\/\s?\d?$/, '')); 12122 } 12123 }, 12124 restrictExpiry = function (e) { 12125 var elm = angular.element(e.currentTarget), digit, value; 12126 12127 digit = String.fromCharCode(e.which); 12128 if (!/^\d+$/.test(digit)) { return; } 12129 if (payment.hasTextSelected(elm)) { return; } 12130 value = elm.val() + digit; 12131 value = value.replace(/\D/g, ''); 12132 if (value.length > 6) { e.preventDefault(); } 12133 }; 12134 12135 return { 12136 link: function postLink(scope, element) { 12137 element.bind('keypress', restrictExpiry); 12138 element.bind('keypress', formatExpiry); 12139 element.bind('keypress', formatForwardSlash); 12140 element.bind('keypress', formatForwardExpiry); 12141 element.bind('keydown', formatBackExpiry); 12142 } 12143 }; 12144 }]) 12145 12146 .directive('cardExpiryValidator', ['payment', function (payment) { 12147 'use strict'; 12148 var cardExpiryVal = function (value) { 12149 var month, prefix, year, ref; 12150 12151 value = value.replace(/\s/g, ''); 12152 ref = value.split('/', 2); 12153 month = ref[0]; 12154 year = ref[1]; 12155 12156 if ((year ? year.length : undefined) === 2 && /^\d+$/.test(year)) { 12157 prefix = (new Date()).getFullYear(); 12158 prefix = prefix.toString().slice(0, 2); 12159 year = prefix + year; 12160 } 12161 12162 month = parseInt(month, 10); 12163 year = parseInt(year, 10); 12164 12165 return { month: month, year: year }; 12166 }; 12167 12168 return { 12169 require: 'ngModel', 12170 link: function (scope, elm, attrs, ngModelCtrl) { 12171 ngModelCtrl.$parsers.unshift(function (value) { 12172 var expiry = cardExpiryVal(value), valid = payment.validateCardExpiry(expiry.month, expiry.year); 12173 ngModelCtrl.$setValidity('cardExpiry', valid); 12174 return valid ? expiry : undefined; 12175 }); 12176 12177 ngModelCtrl.$formatters.unshift(function (value) {
12178 var valid = (value && value.hasOwnProperty('month') && value.hasOwnProperty('year')) ? 12179 payment.validateCardExpiry(value.month, value.year) : false; 12180 ngModelCtrl.$setValidity('cardExpiry', valid); 12181 return valid ? value.month + ' / ' + value.year : undefined; 12182 }); 12183 } 12184 }; 12185 }]); 12186angular.module('payment.cardNumber', ['payment.service', 'payment.restrictNumeric']) 12187 .directive('cardNumberInput', function () { 12188 'use strict'; 12189 return { 12190 restrict: 'E', 12191 templateUrl: 'template/cardNumber/cardNumber.html', 12192 replace: true 12193 }; 12194 }) 12195 12196 .directive('cardNumberFormatter', ['$timeout', '$parse', 'payment', function ($timeout, $parse, payment) { 12197 'use strict'; 12198 var restrictCardNumber = function (e) { 12199 var card, digit = String.fromCharCode(e.which), value, elm = angular.element(e.currentTarget); 12200 12201 if (!/^\d+$/.test(digit)) { return; } 12202 if (payment.hasTextSelected(elm)) { return; } 12203 12204 value = (elm.val() + digit).replace(/\D/g, ''); 12205 card = payment.cardFromNumber(value); 12206 12207 if (card && value.length > card.length[card.length.length - 1]) { 12208 e.preventDefault(); 12209 } else if (value.length > 16) { 12210 e.preventDefault(); 12211 } 12212 }, 12213 formatCardNumber = function (e) { 12214 var elm, card, digit, length, re, upperLength = 16, value; 12215 12216 digit = String.fromCharCode(e.which); 12217 if (!/^\d+$/.test(digit)) { return; } 12218 12219 elm = angular.element(e.currentTarget); 12220 value = elm.val(); 12221 card = payment.cardFromNumber(value + digit); 12222 length = (value.replace(/\D/g, '') + digit).length; 12223 12224 if (card) { upperLength = card.length[card.length.length - 1]; } 12225 if (length >= upperLength) { return; } 12226 if ((elm.prop('selectionStart') !== null) && elm.prop('selectionStart') !== value.length) { return; } 12227 if (card && card.type === 'amex') { 12228 re = /^(\d{4}|\d{4}\s\d{6})$/; 12229 } else { 12230 re = /(?:^|\s)(\d{4})$/; 12231 } 12232 12233 if (re.test(value)) { 12234 e.preventDefault(); 12235 elm.val(value + ' ' + digit); 12236 } else if (re.test(value + digit)) { 12237 e.preventDefault(); 12238 elm.val(value + digit + ' '); 12239 } 12240 }, 12241 reFormatCardNumber = function (e) { 12242 var elm = angular.element(e.currentTarget); 12243 $timeout(function () { 12244 var value = elm.val(); 12245 value = payment.formatCardNumber(value); 12246 elm.val(value); 12247 }); 12248 }; 12249 12250 return { 12251 require: 'ngModel', 12252 link: function postLink(scope, element, attrs, ngModelCtrl) { 12253 var cardType = $parse(attrs.cardType); 12254 12255 element.bind('keypress', restrictCardNumber); 12256 element.bind('keypress', formatCardNumber); 12257 element.bind('paste', reFormatCardNumber); 12258 12259 function applyCardType(value) { 12260 if (attrs.cardType) { 12261 var card = payment.cardFromNumber(value); 12262 cardType.assign(scope, (card && cardType !== card.type) ? card.type : null); 12263 } 12264 } 12265 12266 ngModelCtrl.$formatters.unshift(function (value) { 12267 applyCardType(value); 12268 return payment.formatCardNumber(value); 12269 }); 12270 12271 ngModelCtrl.$parsers.unshift(function (value) { 12272 applyCardType(value); 12273 return value; 12274 }); 12275 } 12276 }; 12277 }]) 12278 12279 .directive('cardNumberValidator', ['payment', function (payment) { 12280 'use strict'; 12281 return { 12282 require: 'ngModel', 12283 link: function (scope, elm, attrs, ngModelCtrl) { 12284 function validate(value) { 12285 if (!value) { return false; }
vendor: 3,266 bytes, lines 12286-12404
12286 var valid = payment.validateCardNumber(value); 12287 return valid; 12288 } 12289 12290 ngModelCtrl.$parsers.push(function (value) { 12291 return validate(value) ? value.replace(/ /g, '') : undefined; 12292 }); 12293 12294 ngModelCtrl.$formatters.unshift(function (value) { 12295 validate(value); 12296 return value; 12297 }); 12298 } 12299 }; 12300 }]);; 12301/** 12302 * @license AngularJS v1.8.2 12303 * (c) 2010-2020 Google LLC. http://angularjs.org 12304 * License: MIT 12305 */ 12306(function(window, angular) {'use strict'; 12307 12308/* global shallowCopy: true */ 12309 12310/** 12311 * Creates a shallow copy of an object, an array or a primitive. 12312 * 12313 * Assumes that there are no proto properties for objects. 12314 */ 12315function shallowCopy(src, dst) { 12316 if (isArray(src)) { 12317 dst = dst || []; 12318 12319 for (var i = 0, ii = src.length; i < ii; i++) { 12320 dst[i] = src[i]; 12321 } 12322 } else if (isObject(src)) { 12323 dst = dst || {}; 12324 12325 for (var key in src) { 12326 if (!(key.charAt(0) === '$' && key.charAt(1) === '$')) { 12327 dst[key] = src[key]; 12328 } 12329 } 12330 } 12331 12332 return dst || src; 12333} 12334 12335/* global routeToRegExp: true */ 12336 12337/** 12338 * @param {string} path - The path to parse. (It is assumed to have query and hash stripped off.) 12339 * @param {Object} opts - Options. 12340 * @return {Object} - An object containing an array of path parameter names (`keys`) and a regular 12341 * expression (`regexp`) that can be used to identify a matching URL and extract the path 12342 * parameter values. 12343 * 12344 * @description 12345 * Parses the given path, extracting path parameter names and a regular expression to match URLs. 12346 * 12347 * Originally inspired by `pathRexp` in `visionmedia/express/lib/utils.js`. 12348 */ 12349function routeToRegExp(path, opts) { 12350 var keys = []; 12351 12352 var pattern = path 12353 .replace(/([().])/g, '\\$1') 12354 .replace(/(\/)?:(\w+)(\*\?|[?*])?/g, function(_, slash, key, option) { 12355 var optional = option === '?' || option === '*?'; 12356 var star = option === '*' || option === '*?'; 12357 keys.push({name: key, optional: optional}); 12358 slash = slash || ''; 12359 return ( 12360 (optional ? '(?:' + slash : slash + '(?:') + 12361 (star ? '(.+?)' : '([^/]+)') + 12362 (optional ? '?)?' : ')') 12363 ); 12364 }) 12365 .replace(/([/$*])/g, '\\$1'); 12366 12367 if (opts.ignoreTrailingSlashes) { 12368 pattern = pattern.replace(/\/+$/, '') + '/*'; 12369 } 12370 12371 return { 12372 keys: keys, 12373 regexp: new RegExp( 12374 '^' + pattern + '(?:[?#]|$)', 12375 opts.caseInsensitiveMatch ? 'i' : '' 12376 ) 12377 }; 12378} 12379 12380/* global routeToRegExp: false */ 12381/* global shallowCopy: false */ 12382 12383// `isArray` and `isObject` are necessary for `shallowCopy()` (included via `src/shallowCopy.js`). 12384// They are initialized inside the `$RouteProvider`, to ensure `window.angular` is available. 12385var isArray; 12386var isObject; 12387var isDefined; 12388var noop; 12389 12390/** 12391 * @ngdoc module 12392 * @name ngRoute 12393 * @description 12394 * 12395 * The `ngRoute` module provides routing and deeplinking services and directives for AngularJS apps. 12396 * 12397 * ## Example 12398 * See {@link ngRoute.$route#examples $route} for an example of configuring and using `ngRoute`. 12399 * 12400 */ 12401/* global -ngRouteModule */ 12402var ngRouteModule = angular. 12403 module('ngRoute', []). 12404 info({ angularVersion: '1.8.2
vendor: 44,168 bytes, lines 12404-13566
12404' }). 12405 provider('$route', $RouteProvider). 12406 // Ensure `$route` will be instantiated in time to capture the initial `$locationChangeSuccess` 12407 // event (unless explicitly disabled). This is necessary in case `ngView` is included in an 12408 // asynchronously loaded template. 12409 run(instantiateRoute); 12410var $routeMinErr = angular.$$minErr('ngRoute'); 12411var isEagerInstantiationEnabled; 12412 12413 12414/** 12415 * @ngdoc provider 12416 * @name $routeProvider 12417 * @this 12418 * 12419 * @description 12420 * 12421 * Used for configuring routes. 12422 * 12423 * ## Example 12424 * See {@link ngRoute.$route#examples $route} for an example of configuring and using `ngRoute`. 12425 * 12426 * ## Dependencies 12427 * Requires the {@link ngRoute `ngRoute`} module to be installed. 12428 */ 12429function $RouteProvider() { 12430 isArray = angular.isArray; 12431 isObject = angular.isObject; 12432 isDefined = angular.isDefined; 12433 noop = angular.noop; 12434 12435 function inherit(parent, extra) { 12436 return angular.extend(Object.create(parent), extra); 12437 } 12438 12439 var routes = {}; 12440 12441 /** 12442 * @ngdoc method 12443 * @name $routeProvider#when 12444 * 12445 * @param {string} path Route path (matched against `$location.path`). If `$location.path` 12446 * contains redundant trailing slash or is missing one, the route will still match and the 12447 * `$location.path` will be updated to add or drop the trailing slash to exactly match the 12448 * route definition. 12449 * 12450 * * `path` can contain named groups starting with a colon: e.g. `:name`. All characters up 12451 * to the next slash are matched and stored in `$routeParams` under the given `name` 12452 * when the route matches. 12453 * * `path` can contain named groups starting with a colon and ending with a star: 12454 * e.g.`:name*`. All characters are eagerly stored in `$routeParams` under the given `name` 12455 * when the route matches. 12456 * * `path` can contain optional named groups with a question mark: e.g.`:name?`. 12457 * 12458 * For example, routes like `/color/:color/largecode/:largecode*\/edit` will match 12459 * `/color/brown/largecode/code/with/slashes/edit` and extract: 12460 * 12461 * * `color: brown` 12462 * * `largecode: code/with/slashes`. 12463 * 12464 * 12465 * @param {Object} route Mapping information to be assigned to `$route.current` on route 12466 * match. 12467 * 12468 * Object properties: 12469 * 12470 * - `controller` – `{(string|Function)=}` – Controller fn that should be associated with 12471 * newly created scope or the name of a {@link angular.Module#controller registered 12472 * controller} if passed as a string. 12473 * - `controllerAs` – `{string=}` – An identifier name for a reference to the controller. 12474 * If present, the controller will be published to scope under the `controllerAs` name. 12475 * - `template` – `{(string|Function)=}` – html template as a string or a function that 12476 * returns an html template as a string which should be used by {@link 12477 * ngRoute.directive:ngView ngView} or {@link ng.directive:ngInclude ngInclude} directives. 12478 * This property takes precedence over `templateUrl`. 12479 * 12480 * If `template` is a function, it will be called with the following parameters: 12481 * 12482 * - `{Array.<Object>}` - route parameters extracted from the current 12483 * `$location.path()` by applying the current route 12484 * 12485 * One of `template` or `templateUrl` is required. 12486 * 12487 * - `templateUrl` – `{(string|Function)=}` – path or function that returns a path to an html 12488 * template that should be used by {@link ngRoute.directive:ngView ngView}. 12489 * 12490 * If `templateUrl` is a function, it will be called with the following parameters: 12491 * 12492 * - `{Array.<Object>}` - route parameters extracted from the current 12493 * `$location.path()` by applying the current route 12494 * 12495 * One of `templateUrl` or `template` is required. 12496 * 12497 * - `resolve` - `{Object.<string, Function>=}` - An optional map of dependencies which should 12498 * be injected into the controller. If any of these dependencies are promises, the router 12499 * will wait for them all to be resolved or one to be rejected before the controller is 12500 * instantiated. 12501 * If all the promises are resolved successfully, the values of the resolved promises are 12502 * injected and {@link ngRoute.$route#$routeChangeSuccess $routeChangeSuccess} event is 12503 * fired. If any of the promises are rejected the 12504 * {@link ngRoute.$route#$routeChangeError $routeChangeError} event is fired. 12505 * For easier access to the resolved dependencies from the template, the `resolve` map will 12506 * be available on the scope of the route, under `$resolve` (by default) or a custom name 12507 * specified by the `resolveAs` property (see below). This can be particularly useful, when 12508 * working with {@link angular.Module#component components} as route templates.<br /> 12509 * <div class="alert alert-warning"> 12510 * **Note:** If your scope already contains a property with this name, it will be hidden 12511 * or overwritten. Make sure, you specify an appropriate name for this property, that 12512 * does not collide with other properties on the scope. 12513 * </div> 12514 * The map object is: 12515 * 12516 * - `key` – `{string}`: a name of a dependency to be injected into the controller. 12517 * - `factory` - `{string|Function}`: If `string` then it is an alias for a service. 12518 * Otherwise if function, then it is {@link auto.$injector#invoke injected} 12519 * and the return value is treated as the dependency. If the result is a promise, it is 12520 * resolved before its value is injected into the controller. Be aware that 12521 * `ngRoute.$routeParams` will still refer to the previous route within these resolve 12522 * functions. Use `$route.current.params` to access the new route parameters, instead. 12523 * 12524 * - `resolveAs` - `{string=}` - The name under which the `resolve` map will be available on 12525 * the scope of the route. If omitted, defaults to `$resolve`. 12526 * 12527 * - `redirectTo` – `{(string|Function)=}` – value to update 12528 * {@link ng.$location $location} path with and trigger route redirection. 12529 * 12530 * If `redirectTo` is a function, it will be called with the following parameters: 12531 * 12532 * - `{Object.<string>}` - route parameters extracted from the current 12533 * `$location.path()` by applying the current route templateUrl. 12534 * - `{string}` - current `$location.path()` 12535 * - `{Object}` - current `$location.search()` 12536 * 12537 * The custom `redirectTo` function is expected to return a string which will be used 12538 * to update `$location.url()`. If the function throws an error, no further processing will 12539 * take place and the {@link ngRoute.$route#$routeChangeError $routeChangeError} event will 12540 * be fired. 12541 * 12542 * Routes that specify `redirectTo` will not have their controllers, template functions 12543 * or resolves called, the `$location` will be changed to the redirect url and route 12544 * processing will stop. The exception to this is if the `redirectTo` is a function that 12545 * returns `undefined`. In this case the route transition occurs as though there was no 12546 * redirection. 12547 * 12548 * - `resolveRedirectTo` – `{Function=}` – a function that will (eventually) return the value 12549 * to update {@link ng.$location $location} URL with and trigger route redirection. In 12550 * contrast to `redirectTo`, dependencies can be injected into `resolveRedirectTo` and the 12551 * return value can be either a string or a promise that will be resolved to a string. 12552 * 12553 * Similar to `redirectTo`, if the return value is `undefined` (or a promise that gets 12554 * resolved to `undefined`), no redirection takes place and the route transition occurs as 12555 * though there was no redirection. 12556 * 12557 * If the function throws an error or the returned promise gets rejected, no further 12558 * processing will take place and the 12559 * {@link ngRoute.$route#$routeChangeError $routeChangeError} event will be fired. 12560 * 12561 * `redirectTo` takes precedence over `resolveRedirectTo`, so specifying both on the same 12562 * route definition, will cause the latter to be ignored. 12563 * 12564 * - `[reloadOnUrl=true]` - `{boolean=}` - reload route when any part of the URL changes 12565 * (including the path) even if the new URL maps to the same route. 12566 * 12567 * If the option is set to `false` and the URL in the browser changes, but the new URL maps 12568 * to the same route, then a `$routeUpdate` event is broadcasted on the root scope (without 12569 * reloading the route). 12570 * 12571 * - `[reloadOnSearch=true]` - `{boolean=}` - reload route when only `$location.search()` 12572 * or `$location.hash()` changes. 12573 * 12574 * If the option is set to `false` and the URL in the browser changes, then a `$routeUpdate` 12575 * event is broadcasted on the root scope (without reloading the route). 12576 * 12577 * <div class="alert alert-warning"> 12578 * **Note:** This option has no effect if `reloadOnUrl` is set to `false`. 12579 * </div> 12580 * 12581 * - `[caseInsensitiveMatch=false]` - `{boolean=}` - match routes without being case sensitive 12582 * 12583 * If the option is set to `true`, then the particular route can be matched without being 12584 * case sensitive 12585 * 12586 * @returns {Object} self 12587 * 12588 * @description 12589 * Adds a new route definition to the `$route` service. 12590 */ 12591 this.when = function(path, route) { 12592 //copy original route object to preserve params inherited from proto chain 12593 var routeCopy = shallowCopy(route); 12594 if (angular.isUndefined(routeCopy.reloadOnUrl)) { 12595 routeCopy.reloadOnUrl = true; 12596 } 12597 if (angular.isUndefined(routeCopy.reloadOnSearch)) { 12598 routeCopy.reloadOnSearch = true; 12599 } 12600 if (angular.isUndefined(routeCopy.caseInsensitiveMatch)) { 12601 routeCopy.caseInsensitiveMatch = this.caseInsensitiveMatch; 12602 } 12603 routes[path] = angular.extend( 12604 routeCopy, 12605 {originalPath: path}, 12606 path && routeToRegExp(path, routeCopy) 12607 ); 12608 12609 // create redirection for trailing slashes 12610 if (path) { 12611 var redirectPath = (path[path.length - 1] === '/') 12612 ? path.substr(0, path.length - 1) 12613 : path + '/'; 12614 12615 routes[redirectPath] = angular.extend( 12616 {originalPath: path, redirectTo: path}, 12617 routeToRegExp(redirectPath, routeCopy) 12618 ); 12619 } 12620 12621 return this; 12622 }; 12623 12624 /** 12625 * @ngdoc property 12626 * @name $routeProvider#caseInsensitiveMatch 12627 * @description 12628 * 12629 * A boolean property indicating if routes defined 12630 * using this provider should be matched using a case insensitive 12631 * algorithm. Defaults to `false`. 12632 */ 12633 this.caseInsensitiveMatch = false; 12634 12635 /** 12636 * @ngdoc method 12637 * @name $routeProvider#otherwise 12638 * 12639 * @description 12640 * Sets route definition that will be used on route change when no other route definition 12641 * is matched. 12642 * 12643 * @param {Object|string} params Mapping information to be assigned to `$route.current`. 12644 * If called with a string, the value maps to `redirectTo`. 12645 * @returns {Object} self 12646 */ 12647 this.otherwise = function(params) { 12648 if (typeof params === 'string') { 12649 params = {redirectTo: params}; 12650 } 12651 this.when(null, params); 12652 return this; 12653 }; 12654 12655 /** 12656 * @ngdoc method 12657 * @name $routeProvider#eagerInstantiationEnabled 12658 * @kind function 12659 * 12660 * @description 12661 * Call this method as a setter to enable/disable eager instantiation of the 12662 * {@link ngRoute.$route $route} service upon application bootstrap. You can also call it as a 12663 * getter (i.e. without any arguments) to get the current value of the 12664 * `eagerInstantiationEnabled` flag. 12665 * 12666 * Instantiating `$route` early is necessary for capturing the initial 12667 * {@link ng.$location#$locationChangeStart $locationChangeStart} event and navigating to the 12668 * appropriate route. Usually, `$route` is instantiated in time by the 12669 * {@link ngRoute.ngView ngView} directive. Yet, in cases where `ngView` is included in an 12670 * asynchronously loaded template (e.g. in another directive's template), the directive factory 12671 * might not be called soon enough for `$route` to be instantiated _before_ the initial 12672 * `$locationChangeSuccess` event is fired. Eager instantiation ensures that `$route` is always 12673 * instantiated in time, regardless of when `ngView` will be loaded. 12674 * 12675 * The default value is true. 12676 * 12677 * **Note**:<br /> 12678 * You may want to disable the default behavior when unit-testing modules that depend on 12679 * `ngRoute`, in order to avoid an unexpected request for the default route's template. 12680 * 12681 * @param {boolean=} enabled - If provided, update the internal `eagerInstantiationEnabled` flag. 12682 * 12683 * @returns {*} The current value of the `eagerInstantiationEnabled` flag if used as a getter or 12684 * itself (for chaining) if used as a setter. 12685 */ 12686 isEagerInstantiationEnabled = true; 12687 this.eagerInstantiationEnabled = function eagerInstantiationEnabled(enabled) { 12688 if (isDefined(enabled)) { 12689 isEagerInstantiationEnabled = enabled; 12690 return this; 12691 } 12692 12693 return isEagerInstantiationEnabled; 12694 }; 12695 12696 12697 this.$get = ['$rootScope', 12698 '$location', 12699 '$routeParams', 12700 '$q', 12701 '$injector', 12702 '$templateRequest', 12703 '$sce', 12704 '$browser', 12705 function($rootScope, $location, $routeParams, $q, $injector, $templateRequest, $sce, $browser) { 12706 12707 /** 12708 * @ngdoc service 12709 * @name $route 12710 * @requires $location 12711 * @requires $routeParams 12712 * 12713 * @property {Object} current Reference to the current route definition. 12714 * The route definition contains: 12715 * 12716 * - `controller`: The controller constructor as defined in the route definition. 12717 * - `locals`: A map of locals which is used by {@link ng.$controller $controller} service for 12718 * controller instantiation. The `locals` contain 12719 * the resolved values of the `resolve` map. Additionally the `locals` also contain: 12720 * 12721 * - `$scope` - The current route scope. 12722 * - `$template` - The current route template HTML. 12723 * 12724 * The `locals` will be assigned to the route scope's `$resolve` property. You can override 12725 * the property name, using `resolveAs` in the route definition. See 12726 * {@link ngRoute.$routeProvider $routeProvider} for more info. 12727 * 12728 * @property {Object} routes Object with all route configuration Objects as its properties. 12729 * 12730 * @description 12731 * `$route` is used for deep-linking URLs to controllers and views (HTML partials). 12732 * It watches `$location.url()` and tries to map the path to an existing route definition. 12733 * 12734 * Requires the {@link ngRoute `ngRoute`} module to be installed. 12735 * 12736 * You can define routes through {@link ngRoute.$routeProvider $routeProvider}'s API. 12737 * 12738 * The `$route` service is typically used in conjunction with the 12739 * {@link ngRoute.directive:ngView `ngView`} directive and the 12740 * {@link ngRoute.$routeParams `$routeParams`} service. 12741 * 12742 * @example 12743 * This example shows how changing the URL hash causes the `$route` to match a route against the 12744 * URL, and the `ngView` pulls in the partial. 12745 * 12746 * <example name="$route-service" module="ngRouteExample" 12747 * deps="angular-route.js" fixBase="true"> 12748 * <file name="index.html"> 12749 * <div ng-controller="MainController"> 12750 * Choose: 12751 * <a href="Book/Moby">Moby</a> | 12752 * <a href="Book/Moby/ch/1">Moby: Ch1</a> | 12753 * <a href="Book/Gatsby">Gatsby</a> | 12754 * <a href="Book/Gatsby/ch/4?key=value">Gatsby: Ch4</a> | 12755 * <a href="Book/Scarlet">Scarlet Letter</a><br/> 12756 * 12757 * <div ng-view></div> 12758 * 12759 * <hr /> 12760 * 12761 * <pre>$location.path() = {{$location.path()}}</pre> 12762 * <pre>$route.current.templateUrl = {{$route.current.templateUrl}}</pre> 12763 * <pre>$route.current.params = {{$route.current.params}}</pre> 12764 * <pre>$route.current.scope.name = {{$route.current.scope.name}}</pre> 12765 * <pre>$routeParams = {{$routeParams}}</pre> 12766 * </div> 12767 * </file> 12768 * 12769 * <file name="book.html"> 12770 * controller: {{name}}<br /> 12771 * Book Id: {{params.bookId}}<br /> 12772 * </file> 12773 * 12774 * <file name="chapter.html"> 12775 * controller: {{name}}<br /> 12776 * Book Id: {{params.bookId}}<br /> 12777 * Chapter Id: {{params.chapterId}} 12778 * </file> 12779 * 12780 * <file name="script.js"> 12781 * angular.module('ngRouteExample', ['ngRoute']) 12782 * 12783 * .controller('MainController', function($scope, $route, $routeParams, $location) { 12784 * $scope.$route = $route; 12785 * $scope.$location = $location; 12786 * $scope.$routeParams = $routeParams; 12787 * }) 12788 * 12789 * .controller('BookController', function($scope, $routeParams) { 12790 * $scope.name = 'BookController'; 12791 * $scope.params = $routeParams; 12792 * }) 12793 * 12794 * .controller('ChapterController', function($scope, $routeParams) { 12795 * $scope.name = 'ChapterController'; 12796 * $scope.params = $routeParams; 12797 * }) 12798 * 12799 * .config(function($routeProvider, $locationProvider) { 12800 * $routeProvider 12801 * .when('/Book/:bookId', { 12802 * templateUrl: 'book.html', 12803 * controller: 'BookController', 12804 * resolve: { 12805 * // I will cause a 1 second delay 12806 * delay: function($q, $timeout) { 12807 * var delay = $q.defer(); 12808 * $timeout(delay.resolve, 1000); 12809 * return delay.promise; 12810 * } 12811 * } 12812 * }) 12813 * .when('/Book/:bookId/ch/:chapterId', { 12814 * templateUrl: 'chapter.html', 12815 * controller: 'ChapterController' 12816 * }); 12817 * 12818 * // configure html5 to get links working on jsfiddle 12819 * $locationProvider.html5Mode(true); 12820 * }); 12821 * 12822 * </file> 12823 * 12824 * <file name="protractor.js" type="protractor"> 12825 * it('should load and compile correct template', function() { 12826 * element(by.linkText('Moby: Ch1')).click(); 12827 * var content = element(by.css('[ng-view]')).getText(); 12828 * expect(content).toMatch(/controller: ChapterController/); 12829 * expect(content).toMatch(/Book Id: Moby/); 12830 * expect(content).toMatch(/Chapter Id: 1/); 12831 * 12832 * element(by.partialLinkText('Scarlet')).click(); 12833 * 12834 * content = element(by.css('[ng-view]')).getText(); 12835 * expect(content).toMatch(/controller: BookController/); 12836 * expect(content).toMatch(/Book Id: Scarlet/); 12837 * }); 12838 * </file> 12839 * </example> 12840 */ 12841 12842 /** 12843 * @ngdoc event 12844 * @name $route#$routeChangeStart 12845 * @eventType broadcast on root scope 12846 * @description 12847 * Broadcasted before a route change. At this point the route services starts 12848 * resolving all of the dependencies needed for the route change to occur. 12849 * Typically this involves fetching the view template as well as any dependencies 12850 * defined in `resolve` route property. Once all of the dependencies are resolved 12851 * `$routeChangeSuccess` is fired. 12852 * 12853 * The route change (and the `$location` change that triggered it) can be prevented 12854 * by calling `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on} 12855 * for more details about event object. 12856 * 12857 * @param {Object} angularEvent Synthetic event object. 12858 * @param {Route} next Future route information. 12859 * @param {Route} current Current route information. 12860 */ 12861 12862 /** 12863 * @ngdoc event 12864 * @name $route#$routeChangeSuccess 12865 * @eventType broadcast on root scope 12866 * @description 12867 * Broadcasted after a route change has happened successfully. 12868 * The `resolve` dependencies are now available in the `current.locals` property. 12869 * 12870 * {@link ngRoute.directive:ngView ngView} listens for the directive 12871 * to instantiate the controller and render the view. 12872 * 12873 * @param {Object} angularEvent Synthetic event object. 12874 * @param {Route} current Current route information. 12875 * @param {Route|Undefined} previous Previous route information, or undefined if current is 12876 * first route entered. 12877 */ 12878 12879 /** 12880 * @ngdoc event 12881 * @name $route#$routeChangeError 12882 * @eventType broadcast on root scope 12883 * @description 12884 * Broadcasted if a redirection function fails or any redirection or resolve promises are 12885 * rejected. 12886 * 12887 * @param {Object} angularEvent Synthetic event object 12888 * @param {Route} current Current route information. 12889 * @param {Route} previous Previous route information. 12890 * @param {Route} rejection The thrown error or the rejection reason of the promise. Usually 12891 * the rejection reason is the error that caused the promise to get rejected. 12892 */ 12893 12894 /** 12895 * @ngdoc event 12896 * @name $route#$routeUpdate 12897 * @eventType broadcast on root scope 12898 * @description 12899 * Broadcasted if the same instance of a route (including template, controller instance, 12900 * resolved dependencies, etc.) is being reused. This can happen if either `reloadOnSearch` or 12901 * `reloadOnUrl` has been set to `false`. 12902 * 12903 * @param {Object} angularEvent Synthetic event object 12904 * @param {Route} current Current/previous route information. 12905 */ 12906 12907 var forceReload = false, 12908 preparedRoute, 12909 preparedRouteIsUpdateOnly, 12910 $route = { 12911 routes: routes, 12912 12913 /** 12914 * @ngdoc method 12915 * @name $route#reload 12916 * 12917 * @description 12918 * Causes `$route` service to reload the current route even if 12919 * {@link ng.$location $location} hasn't changed. 12920 * 12921 * As a result of that, {@link ngRoute.directive:ngView ngView} 12922 * creates new scope and reinstantiates the controller. 12923 */ 12924 reload: function() { 12925 forceReload = true; 12926 12927 var fakeLocationEvent = { 12928 defaultPrevented: false, 12929 preventDefault: function fakePreventDefault() { 12930 this.defaultPrevented = true; 12931 forceReload = false; 12932 } 12933 }; 12934 12935 $rootScope.$evalAsync(function() { 12936 prepareRoute(fakeLocationEvent); 12937 if (!fakeLocationEvent.defaultPrevented) commitRoute(); 12938 }); 12939 }, 12940 12941 /** 12942 * @ngdoc method 12943 * @name $route#updateParams 12944 * 12945 * @description 12946 * Causes `$route` service to update the current URL, replacing 12947 * current route parameters with those specified in `newParams`. 12948 * Provided property names that match the route's path segment 12949 * definitions will be interpolated into the location's path, while 12950 * remaining properties will be treated as query params. 12951 * 12952 * @param {!Object<string, string>} newParams mapping of URL parameter names to values 12953 */ 12954 updateParams: function(newParams) { 12955 if (this.current && this.current.$$route) { 12956 newParams = angular.extend({}, this.current.params, newParams); 12957 $location.path(interpolate(this.current.$$route.originalPath, newParams)); 12958 // interpolate modifies newParams, only query params are left 12959 $location.search(newParams); 12960 } else { 12961 throw $routeMinErr('norout', 'Tried updating route with no current route'); 12962 } 12963 } 12964 }; 12965 12966 $rootScope.$on('$locationChangeStart', prepareRoute); 12967 $rootScope.$on('$locationChangeSuccess', commitRoute); 12968 12969 return $route; 12970 12971 ///////////////////////////////////////////////////// 12972 12973 /** 12974 * @param on {string} current url 12975 * @param route {Object} route regexp to match the url against 12976 * @return {?Object} 12977 * 12978 * @description 12979 * Check if the route matches the current url. 12980 * 12981 * Inspired by match in 12982 * visionmedia/express/lib/router/router.js. 12983 */ 12984 function switchRouteMatcher(on, route) { 12985 var keys = route.keys, 12986 params = {}; 12987 12988 if (!route.regexp) return null; 12989 12990 var m = route.regexp.exec(on); 12991 if (!m) return null; 12992 12993 for (var i = 1, len = m.length; i < len; ++i) { 12994 var key = keys[i - 1]; 12995 12996 var val = m[i]; 12997 12998 if (key && val) { 12999 params[key.name] = val; 13000 } 13001 } 13002 return params; 13003 } 13004 13005 function prepareRoute($locationEvent) { 13006 var lastRoute = $route.current; 13007 13008 preparedRoute = parseRoute(); 13009 preparedRouteIsUpdateOnly = isNavigationUpdateOnly(preparedRoute, lastRoute); 13010 13011 if (!preparedRouteIsUpdateOnly && (lastRoute || preparedRoute)) { 13012 if ($rootScope.$broadcast('$routeChangeStart', preparedRoute, lastRoute).defaultPrevented) { 13013 if ($locationEvent) { 13014 $locationEvent.preventDefault(); 13015 } 13016 } 13017 } 13018 } 13019 13020 function commitRoute() { 13021 var lastRoute = $route.current; 13022 var nextRoute = preparedRoute; 13023 13024 if (preparedRouteIsUpdateOnly) { 13025 lastRoute.params = nextRoute.params; 13026 angular.copy(lastRoute.params, $routeParams); 13027 $rootScope.$broadcast('$routeUpdate', lastRoute); 13028 } else if (nextRoute || lastRoute) { 13029 forceReload = false; 13030 $route.current = nextRoute; 13031 13032 var nextRoutePromise = $q.resolve(nextRoute); 13033 13034 $browser.$$incOutstandingRequestCount('$route'); 13035 13036 nextRoutePromise. 13037 then(getRedirectionData). 13038 then(handlePossibleRedirection). 13039 then(function(keepProcessingRoute) { 13040 return keepProcessingRoute && nextRoutePromise. 13041 then(resolveLocals). 13042 then(function(locals) { 13043 // after route change 13044 if (nextRoute === $route.current) { 13045 if (nextRoute) { 13046 nextRoute.locals = locals; 13047 angular.copy(nextRoute.params, $routeParams); 13048 } 13049 $rootScope.$broadcast('$routeChangeSuccess', nextRoute, lastRoute); 13050 } 13051 }); 13052 }).catch(function(error) { 13053 if (nextRoute === $route.current) { 13054 $rootScope.$broadcast('$routeChangeError', nextRoute, lastRoute, error); 13055 } 13056 }).finally(function() { 13057 // Because `commitRoute()` is called from a `$rootScope.$evalAsync` block (see 13058 // `$locationWatch`), this `$$completeOutstandingRequest()` call will not cause 13059 // `outstandingRequestCount` to hit zero. This is important in case we are redirecting 13060 // to a new route which also requires some asynchronous work. 13061 13062 $browser.$$completeOutstandingRequest(noop, '$route'); 13063 }); 13064 } 13065 } 13066 13067 function getRedirectionData(route) { 13068 var data = { 13069 route: route, 13070 hasRedirection: false 13071 }; 13072 13073 if (route) { 13074 if (route.redirectTo) { 13075 if (angular.isString(route.redirectTo)) { 13076 data.path = interpolate(route.redirectTo, route.params); 13077 data.search = route.params; 13078 data.hasRedirection = true; 13079 } else { 13080 var oldPath = $location.path(); 13081 var oldSearch = $location.search(); 13082 var newUrl = route.redirectTo(route.pathParams, oldPath, oldSearch); 13083 13084 if (angular.isDefined(newUrl)) { 13085 data.url = newUrl; 13086 data.hasRedirection = true; 13087 } 13088 } 13089 } else if (route.resolveRedirectTo) { 13090 return $q. 13091 resolve($injector.invoke(route.resolveRedirectTo)). 13092 then(function(newUrl) { 13093 if (angular.isDefined(newUrl)) { 13094 data.url = newUrl; 13095 data.hasRedirection = true; 13096 } 13097 13098 return data; 13099 }); 13100 } 13101 } 13102 13103 return data; 13104 } 13105 13106 function handlePossibleRedirection(data) { 13107 var keepProcessingRoute = true; 13108 13109 if (data.route !== $route.current) { 13110 keepProcessingRoute = false; 13111 } else if (data.hasRedirection) { 13112 var oldUrl = $location.url(); 13113 var newUrl = data.url; 13114 13115 if (newUrl) { 13116 $location. 13117 url(newUrl). 13118 replace(); 13119 } else { 13120 newUrl = $location. 13121 path(data.path). 13122 search(data.search). 13123 replace(). 13124 url(); 13125 } 13126 13127 if (newUrl !== oldUrl) { 13128 // Exit out and don't process current next value, 13129 // wait for next location change from redirect 13130 keepProcessingRoute = false; 13131 } 13132 } 13133 13134 return keepProcessingRoute; 13135 } 13136 13137 function resolveLocals(route) { 13138 if (route) { 13139 var locals = angular.extend({}, route.resolve); 13140 angular.forEach(locals, function(value, key) { 13141 locals[key] = angular.isString(value) ? 13142 $injector.get(value) : 13143 $injector.invoke(value, null, null, key); 13144 }); 13145 var template = getTemplateFor(route); 13146 if (angular.isDefined(template)) { 13147 locals['$template'] = template; 13148 } 13149 return $q.all(locals); 13150 } 13151 } 13152 13153 function getTemplateFor(route) { 13154 var template, templateUrl; 13155 if (angular.isDefined(template = route.template)) { 13156 if (angular.isFunction(template)) { 13157 template = template(route.params); 13158 } 13159 } else if (angular.isDefined(templateUrl = route.templateUrl)) { 13160 if (angular.isFunction(templateUrl)) { 13161 templateUrl = templateUrl(route.params); 13162 } 13163 if (angular.isDefined(templateUrl)) { 13164 route.loadedTemplateUrl = $sce.valueOf(templateUrl); 13165 template = $templateRequest(templateUrl); 13166 } 13167 } 13168 return template; 13169 } 13170 13171 /** 13172 * @returns {Object} the current active route, by matching it against the URL 13173 */ 13174 function parseRoute() { 13175 // Match a route 13176 var params, match; 13177 angular.forEach(routes, function(route, path) { 13178 if (!match && (params = switchRouteMatcher($location.path(), route))) { 13179 match = inherit(route, { 13180 params: angular.extend({}, $location.search(), params), 13181 pathParams: params}); 13182 match.$$route = route; 13183 } 13184 }); 13185 // No route matched; fallback to "otherwise" route 13186 return match || routes[null] && inherit(routes[null], {params: {}, pathParams:{}}); 13187 } 13188 13189 /** 13190 * @param {Object} newRoute - The new route configuration (as returned by `parseRoute()`). 13191 * @param {Object} oldRoute - The previous route configuration (as returned by `parseRoute()`). 13192 * @returns {boolean} Whether this is an "update-only" navigation, i.e. the URL maps to the same 13193 * route and it can be reused (based on the config and the type of change). 13194 */ 13195 function isNavigationUpdateOnly(newRoute, oldRoute) { 13196 // IF this is not a forced reload 13197 return !forceReload 13198 // AND both `newRoute`/`oldRoute` are defined 13199 && newRoute && oldRoute 13200 // AND they map to the same Route Definition Object 13201 && (newRoute.$$route === oldRoute.$$route) 13202 // AND `reloadOnUrl` is disabled 13203 && (!newRoute.reloadOnUrl 13204 // OR `reloadOnSearch` is disabled 13205 || (!newRoute.reloadOnSearch 13206 // AND both routes have the same path params 13207 && angular.equals(newRoute.pathParams, oldRoute.pathParams) 13208 ) 13209 ); 13210 } 13211 13212 /** 13213 * @returns {string} interpolation of the redirect path with the parameters 13214 */ 13215 function interpolate(string, params) { 13216 var result = []; 13217 angular.forEach((string || '').split(':'), function(segment, i) { 13218 if (i === 0) { 13219 result.push(segment); 13220 } else { 13221 var segmentMatch = segment.match(/(\w+)(?:[?*])?(.*)/); 13222 var key = segmentMatch[1]; 13223 result.push(params[key]); 13224 result.push(segmentMatch[2] || ''); 13225 delete params[key]; 13226 } 13227 }); 13228 return result.join(''); 13229 } 13230 }]; 13231} 13232 13233instantiateRoute.$inject = ['$injector']; 13234function instantiateRoute($injector) { 13235 if (isEagerInstantiationEnabled) { 13236 // Instantiate `$route` 13237 $injector.get('$route'); 13238 } 13239} 13240 13241ngRouteModule.provider('$routeParams', $RouteParamsProvider); 13242 13243 13244/** 13245 * @ngdoc service 13246 * @name $routeParams 13247 * @requires $route 13248 * @this 13249 * 13250 * @description 13251 * The `$routeParams` service allows you to retrieve the current set of route parameters. 13252 * 13253 * Requires the {@link ngRoute `ngRoute`} module to be installed. 13254 * 13255 * The route parameters are a combination of {@link ng.$location `$location`}'s 13256 * {@link ng.$location#search `search()`} and {@link ng.$location#path `path()`}. 13257 * The `path` parameters are extracted when the {@link ngRoute.$route `$route`} path is matched. 13258 * 13259 * In case of parameter name collision, `path` params take precedence over `search` params. 13260 * 13261 * The service guarantees that the identity of the `$routeParams` object will remain unchanged 13262 * (but its properties will likely change) even when a route change occurs. 13263 * 13264 * Note that the `$routeParams` are only updated *after* a route change completes successfully. 13265 * This means that you cannot rely on `$routeParams` being correct in route resolve functions. 13266 * Instead you can use `$route.current.params` to access the new route's parameters. 13267 * 13268 * @example 13269 * ```js 13270 * // Given: 13271 * // URL: http://server.com/index.html#/Chapter/1/Section/2?search=moby 13272 * // Route: /Chapter/:chapterId/Section/:sectionId 13273 * // 13274 * // Then 13275 * $routeParams ==> {chapterId:'1', sectionId:'2', search:'moby'} 13276 * ``` 13277 */ 13278function $RouteParamsProvider() { 13279 this.$get = function() { return {}; }; 13280} 13281 13282ngRouteModule.directive('ngView', ngViewFactory); 13283ngRouteModule.directive('ngView', ngViewFillContentFactory); 13284 13285 13286/** 13287 * @ngdoc directive 13288 * @name ngView 13289 * @restrict ECA 13290 * 13291 * @description 13292 * `ngView` is a directive that complements the {@link ngRoute.$route $route} service by 13293 * including the rendered template of the current route into the main layout (`index.html`) file. 13294 * Every time the current route changes, the included view changes with it according to the 13295 * configuration of the `$route` service. 13296 * 13297 * Requires the {@link ngRoute `ngRoute`} module to be installed. 13298 * 13299 * @animations 13300 * | Animation | Occurs | 13301 * |----------------------------------|-------------------------------------| 13302 * | {@link ng.$animate#enter enter} | when the new element is inserted to the DOM | 13303 * | {@link ng.$animate#leave leave} | when the old element is removed from to the DOM | 13304 * 13305 * The enter and leave animation occur concurrently. 13306 * 13307 * @scope 13308 * @priority 400 13309 * @param {string=} onload Expression to evaluate whenever the view updates. 13310 * 13311 * @param {string=} autoscroll Whether `ngView` should call {@link ng.$anchorScroll 13312 * $anchorScroll} to scroll the viewport after the view is updated. 13313 * 13314 * - If the attribute is not set, disable scrolling. 13315 * - If the attribute is set without value, enable scrolling. 13316 * - Otherwise enable scrolling only if the `autoscroll` attribute value evaluated 13317 * as an expression yields a truthy value. 13318 * @example 13319 <example name="ngView-directive" module="ngViewExample" 13320 deps="angular-route.js;angular-animate.js" 13321 animations="true" fixBase="true"> 13322 <file name="index.html"> 13323 <div ng-controller="MainCtrl as main"> 13324 Choose: 13325 <a href="Book/Moby">Moby</a> | 13326 <a href="Book/Moby/ch/1">Moby: Ch1</a> | 13327 <a href="Book/Gatsby">Gatsby</a> | 13328 <a href="Book/Gatsby/ch/4?key=value">Gatsby: Ch4</a> | 13329 <a href="Book/Scarlet">Scarlet Letter</a><br/> 13330 13331 <div class="view-animate-container"> 13332 <div ng-view class="view-animate"></div> 13333 </div> 13334 <hr /> 13335 13336 <pre>$location.path() = {{main.$location.path()}}</pre> 13337 <pre>$route.current.templateUrl = {{main.$route.current.templateUrl}}</pre> 13338 <pre>$route.current.params = {{main.$route.current.params}}</pre> 13339 <pre>$routeParams = {{main.$routeParams}}</pre> 13340 </div> 13341 </file> 13342 13343 <file name="book.html"> 13344 <div> 13345 controller: {{book.name}}<br /> 13346 Book Id: {{book.params.bookId}}<br /> 13347 </div> 13348 </file> 13349 13350 <file name="chapter.html"> 13351 <div> 13352 controller: {{chapter.name}}<br /> 13353 Book Id: {{chapter.params.bookId}}<br /> 13354 Chapter Id: {{chapter.params.chapterId}} 13355 </div> 13356 </file> 13357 13358 <file name="animations.css"> 13359 .view-animate-container { 13360 position:relative; 13361 height:100px!important; 13362 background:white; 13363 border:1px solid black; 13364 height:40px; 13365 overflow:hidden; 13366 } 13367 13368 .view-animate { 13369 padding:10px; 13370 } 13371 13372 .view-animate.ng-enter, .view-animate.ng-leave { 13373 transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s; 13374 13375 display:block; 13376 width:100%; 13377 border-left:1px solid black; 13378 13379 position:absolute; 13380 top:0; 13381 left:0; 13382 right:0; 13383 bottom:0; 13384 padding:10px; 13385 } 13386 13387 .view-animate.ng-enter { 13388 left:100%; 13389 } 13390 .view-animate.ng-enter.ng-enter-active { 13391 left:0; 13392 } 13393 .view-animate.ng-leave.ng-leave-active { 13394 left:-100%; 13395 } 13396 </file> 13397 13398 <file name="script.js"> 13399 angular.module('ngViewExample', ['ngRoute', 'ngAnimate']) 13400 .config(['$routeProvider', '$locationProvider', 13401 function($routeProvider, $locationProvider) { 13402 $routeProvider 13403 .when('/Book/:bookId', { 13404 templateUrl: 'book.html', 13405 controller: 'BookCtrl', 13406 controllerAs: 'book' 13407 }) 13408 .when('/Book/:bookId/ch/:chapterId', { 13409 templateUrl: 'chapter.html', 13410 controller: 'ChapterCtrl', 13411 controllerAs: 'chapter' 13412 }); 13413 13414 $locationProvider.html5Mode(true); 13415 }]) 13416 .controller('MainCtrl', ['$route', '$routeParams', '$location', 13417 function MainCtrl($route, $routeParams, $location) { 13418 this.$route = $route; 13419 this.$location = $location; 13420 this.$routeParams = $routeParams; 13421 }]) 13422 .controller('BookCtrl', ['$routeParams', function BookCtrl($routeParams) { 13423 this.name = 'BookCtrl'; 13424 this.params = $routeParams; 13425 }]) 13426 .controller('ChapterCtrl', ['$routeParams', function ChapterCtrl($routeParams) { 13427 this.name = 'ChapterCtrl'; 13428 this.params = $routeParams; 13429 }]); 13430 13431 </file> 13432 13433 <file name="protractor.js" type="protractor"> 13434 it('should load and compile correct template', function() { 13435 element(by.linkText('Moby: Ch1')).click(); 13436 var content = element(by.css('[ng-view]')).getText(); 13437 expect(content).toMatch(/controller: ChapterCtrl/); 13438 expect(content).toMatch(/Book Id: Moby/); 13439 expect(content).toMatch(/Chapter Id: 1/); 13440 13441 element(by.partialLinkText('Scarlet')).click(); 13442 13443 content = element(by.css('[ng-view]')).getText(); 13444 expect(content).toMatch(/controller: BookCtrl/); 13445 expect(content).toMatch(/Book Id: Scarlet/); 13446 }); 13447 </file> 13448 </example> 13449 */ 13450 13451 13452/** 13453 * @ngdoc event 13454 * @name ngView#$viewContentLoaded 13455 * @eventType emit on the current ngView scope 13456 * @description 13457 * Emitted every time the ngView content is reloaded. 13458 */ 13459ngViewFactory.$inject = ['$route', '$anchorScroll', '$animate']; 13460function ngViewFactory($route, $anchorScroll, $animate) { 13461 return { 13462 restrict: 'ECA', 13463 terminal: true, 13464 priority: 400, 13465 transclude: 'element', 13466 link: function(scope, $element, attr, ctrl, $transclude) { 13467 var currentScope, 13468 currentElement, 13469 previousLeaveAnimation, 13470 autoScrollExp = attr.autoscroll, 13471 onloadExp = attr.onload || ''; 13472 13473 scope.$on('$routeChangeSuccess', update); 13474 update(); 13475 13476 function cleanupLastView() { 13477 if (previousLeaveAnimation) { 13478 $animate.cancel(previousLeaveAnimation); 13479 previousLeaveAnimation = null; 13480 } 13481 13482 if (currentScope) { 13483 currentScope.$destroy(); 13484 currentScope = null; 13485 } 13486 if (currentElement) { 13487 previousLeaveAnimation = $animate.leave(currentElement); 13488 previousLeaveAnimation.done(function(response) { 13489 if (response !== false) previousLeaveAnimation = null; 13490 }); 13491 currentElement = null; 13492 } 13493 } 13494 13495 function update() { 13496 var locals = $route.current && $route.current.locals, 13497 template = locals && locals.$template; 13498 13499 if (angular.isDefined(template)) { 13500 var newScope = scope.$new(); 13501 var current = $route.current; 13502 13503 // Note: This will also link all children of ng-view that were contained in the original 13504 // html. If that content contains controllers, ... they could pollute/change the scope. 13505 // However, using ng-view on an element with additional content does not make sense... 13506 // Note: We can't remove them in the cloneAttchFn of $transclude as that 13507 // function is called before linking the content, which would apply child 13508 // directives to non existing elements. 13509 var clone = $transclude(newScope, function(clone) { 13510 $animate.enter(clone, null, currentElement || $element).done(function onNgViewEnter(response) { 13511 if (response !== false && angular.isDefined(autoScrollExp) 13512 && (!autoScrollExp || scope.$eval(autoScrollExp))) { 13513 $anchorScroll(); 13514 } 13515 }); 13516 cleanupLastView(); 13517 }); 13518 13519 currentElement = clone; 13520 currentScope = current.scope = newScope; 13521 currentScope.$emit('$viewContentLoaded'); 13522 currentScope.$eval(onloadExp); 13523 } else { 13524 cleanupLastView(); 13525 } 13526 } 13527 } 13528 }; 13529} 13530 13531// This directive is called during the $transclude call of the first `ngView` directive. 13532// It will replace and compile the content of the element with the loaded template. 13533// We need this directive so that the element content is already filled when 13534// the link function of another directive on the same element as ngView 13535// is called. 13536ngViewFillContentFactory.$inject = ['$compile', '$controller', '$route']; 13537function ngViewFillContentFactory($compile, $controller, $route) { 13538 return { 13539 restrict: 'ECA', 13540 priority: -400, 13541 link: function(scope, $element) { 13542 var current = $route.current, 13543 locals = current.locals; 13544 13545 $element.html(locals.$template); 13546 13547 var link = $compile($element.contents()); 13548 13549 if (current.controller) { 13550 locals.$scope = scope; 13551 var controller = $controller(current.controller, locals); 13552 if (current.controllerAs) { 13553 scope[current.controllerAs] = controller; 13554 } 13555 $element.data('$ngControllerController', controller); 13556 $element.children().data('$ngControllerController', controller); 13557 } 13558 scope[current.resolveAs || '$resolve'] = locals; 13559 13560 link(scope); 13561 } 13562 }; 13563} 13564 13565 13566})(window, window.angular);
13567; 13568/** 13569 * @license AngularJS v1.8.2 13570 * (c) 2010-2020 Google LLC. http://angularjs.org 13571 * License: MIT 13572 */ 13573(function(window, angular) {'use strict'; 13574 13575/** 13576 * @ngdoc module 13577 * @name ngCookies 13578 * @description 13579 * 13580 * The `ngCookies` module provides a convenient wrapper for reading and writing browser cookies. 13581 * 13582 * See {@link ngCookies.$cookies `$cookies`} for usage. 13583 */ 13584 13585 13586angular.module('ngCookies', ['ng']). 13587 info({ angularVersion: '1.8.2
vendor: 8,027 bytes, lines 13587-13820
13587' }). 13588 /** 13589 * @ngdoc provider 13590 * @name $cookiesProvider 13591 * @description 13592 * Use `$cookiesProvider` to change the default behavior of the {@link ngCookies.$cookies $cookies} service. 13593 * */ 13594 provider('$cookies', [/** @this */function $CookiesProvider() { 13595 /** 13596 * @ngdoc property 13597 * @name $cookiesProvider#defaults 13598 * @description 13599 * 13600 * Object containing default options to pass when setting cookies. 13601 * 13602 * The object may have following properties: 13603 * 13604 * - **path** - `{string}` - The cookie will be available only for this path and its 13605 * sub-paths. By default, this is the URL that appears in your `<base>` tag. 13606 * - **domain** - `{string}` - The cookie will be available only for this domain and 13607 * its sub-domains. For security reasons the user agent will not accept the cookie 13608 * if the current domain is not a sub-domain of this domain or equal to it. 13609 * - **expires** - `{string|Date}` - String of the form "Wdy, DD Mon YYYY HH:MM:SS GMT" 13610 * or a Date object indicating the exact date/time this cookie will expire. 13611 * - **secure** - `{boolean}` - If `true`, then the cookie will only be available through a 13612 * secured connection. 13613 * - **samesite** - `{string}` - prevents the browser from sending the cookie along with cross-site requests. 13614 * Accepts the values `lax` and `strict`. See the [OWASP Wiki](https://www.owasp.org/index.php/SameSite) 13615 * for more info. Note that as of May 2018, not all browsers support `SameSite`, 13616 * so it cannot be used as a single measure against Cross-Site-Request-Forgery (CSRF) attacks. 13617 * 13618 * Note: By default, the address that appears in your `<base>` tag will be used as the path. 13619 * This is important so that cookies will be visible for all routes when html5mode is enabled. 13620 * 13621 * @example 13622 * 13623 * ```js 13624 * angular.module('cookiesProviderExample', ['ngCookies']) 13625 * .config(['$cookiesProvider', function($cookiesProvider) { 13626 * // Setting default options 13627 * $cookiesProvider.defaults.domain = 'foo.com'; 13628 * $cookiesProvider.defaults.secure = true; 13629 * }]); 13630 * ``` 13631 **/ 13632 var defaults = this.defaults = {}; 13633 13634 function calcOptions(options) { 13635 return options ? angular.extend({}, defaults, options) : defaults; 13636 } 13637 13638 /** 13639 * @ngdoc service 13640 * @name $cookies 13641 * 13642 * @description 13643 * Provides read/write access to browser's cookies. 13644 * 13645 * <div class="alert alert-info"> 13646 * Up until AngularJS 1.3, `$cookies` exposed properties that represented the 13647 * current browser cookie values. In version 1.4, this behavior has changed, and 13648 * `$cookies` now provides a standard api of getters, setters etc. 13649 * </div> 13650 * 13651 * Requires the {@link ngCookies `ngCookies`} module to be installed. 13652 * 13653 * @example 13654 * 13655 * ```js 13656 * angular.module('cookiesExample', ['ngCookies']) 13657 * .controller('ExampleController', ['$cookies', function($cookies) { 13658 * // Retrieving a cookie 13659 * var favoriteCookie = $cookies.get('myFavorite'); 13660 * // Setting a cookie 13661 * $cookies.put('myFavorite', 'oatmeal'); 13662 * }]); 13663 * ``` 13664 */ 13665 this.$get = ['$$cookieReader', '$$cookieWriter', function($$cookieReader, $$cookieWriter) { 13666 return { 13667 /** 13668 * @ngdoc method 13669 * @name $cookies#get 13670 * 13671 * @description 13672 * Returns the value of given cookie key 13673 * 13674 * @param {string} key Id to use for lookup. 13675 * @returns {string} Raw cookie value. 13676 */ 13677 get: function(key) { 13678 return $$cookieReader()[key]; 13679 }, 13680 13681 /** 13682 * @ngdoc method 13683 * @name $cookies#getObject 13684 * 13685 * @description 13686 * Returns the deserialized value of given cookie key 13687 * 13688 * @param {string} key Id to use for lookup. 13689 * @returns {Object} Deserialized cookie value. 13690 */ 13691 getObject: function(key) { 13692 var value = this.get(key); 13693 return value ? angular.fromJson(value) : value; 13694 }, 13695 13696 /** 13697 * @ngdoc method 13698 * @name $cookies#getAll 13699 * 13700 * @description 13701 * Returns a key value object with all the cookies 13702 * 13703 * @returns {Object} All cookies 13704 */ 13705 getAll: function() { 13706 return $$cookieReader(); 13707 }, 13708 13709 /** 13710 * @ngdoc method 13711 * @name $cookies#put 13712 * 13713 * @description 13714 * Sets a value for given cookie key 13715 * 13716 * @param {string} key Id for the `value`. 13717 * @param {string} value Raw value to be stored. 13718 * @param {Object=} options Options object. 13719 * See {@link ngCookies.$cookiesProvider#defaults $cookiesProvider.defaults} 13720 */ 13721 put: function(key, value, options) { 13722 $$cookieWriter(key, value, calcOptions(options)); 13723 }, 13724 13725 /** 13726 * @ngdoc method 13727 * @name $cookies#putObject 13728 * 13729 * @description 13730 * Serializes and sets a value for given cookie key 13731 * 13732 * @param {string} key Id for the `value`. 13733 * @param {Object} value Value to be stored. 13734 * @param {Object=} options Options object. 13735 * See {@link ngCookies.$cookiesProvider#defaults $cookiesProvider.defaults} 13736 */ 13737 putObject: function(key, value, options) { 13738 this.put(key, angular.toJson(value), options); 13739 }, 13740 13741 /** 13742 * @ngdoc method 13743 * @name $cookies#remove 13744 * 13745 * @description 13746 * Remove given cookie 13747 * 13748 * @param {string} key Id of the key-value pair to delete. 13749 * @param {Object=} options Options object. 13750 * See {@link ngCookies.$cookiesProvider#defaults $cookiesProvider.defaults} 13751 */ 13752 remove: function(key, options) { 13753 $$cookieWriter(key, undefined, calcOptions(options)); 13754 } 13755 }; 13756 }]; 13757 }]); 13758 13759/** 13760 * @name $$cookieWriter 13761 * @requires $document 13762 * 13763 * @description 13764 * This is a private service for writing cookies 13765 * 13766 * @param {string} name Cookie name 13767 * @param {string=} value Cookie value (if undefined, cookie will be deleted) 13768 * @param {Object=} options Object with options that need to be stored for the cookie. 13769 */ 13770function $$CookieWriter($document, $log, $browser) { 13771 var cookiePath = $browser.baseHref(); 13772 var rawDocument = $document[0]; 13773 13774 function buildCookieString(name, value, options) { 13775 var path, expires; 13776 options = options || {}; 13777 expires = options.expires; 13778 path = angular.isDefined(options.path) ? options.path : cookiePath; 13779 if (angular.isUndefined(value)) { 13780 expires = 'Thu, 01 Jan 1970 00:00:00 GMT'; 13781 value = ''; 13782 } 13783 if (angular.isString(expires)) { 13784 expires = new Date(expires); 13785 } 13786 13787 var str = encodeURIComponent(name) + '=' + encodeURIComponent(value); 13788 str += path ? ';path=' + path : ''; 13789 str += options.domain ? ';domain=' + options.domain : ''; 13790 str += expires ? ';expires=' + expires.toUTCString() : ''; 13791 str += options.secure ? ';secure' : ''; 13792 str += options.samesite ? ';samesite=' + options.samesite : ''; 13793 13794 // per http://www.ietf.org/rfc/rfc2109.txt browser must allow at minimum: 13795 // - 300 cookies 13796 // - 20 cookies per unique domain 13797 // - 4096 bytes per cookie 13798 var cookieLength = str.length + 1; 13799 if (cookieLength > 4096) { 13800 $log.warn('Cookie \'' + name + 13801 '\' possibly not set or overflowed because it was too large (' + 13802 cookieLength + ' > 4096 bytes)!'); 13803 } 13804 13805 return str; 13806 } 13807 13808 return function(name, value, options) { 13809 rawDocument.cookie = buildCookieString(name, value, options); 13810 }; 13811} 13812 13813$$CookieWriter.$inject = ['$document', '$log', '$browser']; 13814 13815angular.module('ngCookies').provider('$$cookieWriter', /** @this */ function $$CookieWriterProvider() { 13816 this.$get = $$CookieWriter; 13817}); 13818 13819 13820})(window, window.angular);
13821; 13822/* 13823 * Angular Material Data Table 13824 * https://github.com/daniel-nagy/md-data-table 13825 * @license MIT 13826 * v0.10.9 13827 */ 13828(function (window, angular, undefined) { 13829'use strict'; 13830 13831angular.module('md.table.templates', ['md-table-pagination.html', 'md-table-progress.html', 'arrow-up.svg', 'navigate-before.svg', 'navigate-first.svg', 'navigate-last.svg', 'navigate-next.svg']); 13832 13833angular.module('md-table-pagination.html', []).run(['$templateCache', function($templateCache) { 13834 $templateCache.put('md-table-pagination.html', 13835 '<div class="page-select" ng-if="$pagination.showPageSelect()">\n' + 13836 ' <div class="label">{{$pagination.label.page}}</div>\n' + 13837 '\n' + 13838 ' <md-select virtual-page-select total="{{$pagination.pages()}}" class="md-table-select" ng-model="$pagination.page" md-container-class="md-pagination-select" ng-change="$pagination.onPaginationChange()" ng-disabled="$pagination.disabled" aria-label="Page">\n' + 13839 ' <md-content>\n' + 13840 ' <md-option ng-repeat="page in $pageSelect.pages" ng-value="page">{{page}}</md-option>\n' + 13841 ' </md-content>\n' + 13842 ' </md-select>\n' + 13843 '</div>\n' + 13844 '\n' + 13845 '<div class="limit-select" ng-if="$pagination.limitOptions">\n' + 13846 ' <div class="label">{{$pagination.label.rowsPerPage}}</div>\n' + 13847 '\n' + 13848 ' <md-select class="md-table-select" ng-model="$pagination.limit" md-container-class="md-pagination-select" ng-disabled="$pagination.disabled" aria-label="Rows" placeholder="{{ $pagination.limitOptions[0] }}">\n' + 13849 ' <md-option ng-repeat="option in $pagination.limitOptions" ng-value="option.value ? $pagination.eval(option.value) : option">{{::option.label ? option.label : option}}</md-option>\n' + 13850 ' </md-select>\n' + 13851 '</div>\n' + 13852 '\n' + 13853 '<div class="buttons">\n' + 13854 ' <div class="label">{{$pagination.min()}} - {{$pagination.max()}} {{$pagination.label.of}} {{$pagination.total}}</div>\n' + 13855 '\n' + 13856 ' <md-button class="md-icon-button" type="button" ng-if="$pagination.showBoundaryLinks()" ng-click="$pagination.first()" ng-disabled="$pagination.disabled || !$pagination.hasPrevious()" aria-label="First">\n' + 13857 ' <md-icon md-svg-icon="navigate-first.svg"></md-icon>\n' + 13858 ' </md-button>\n' + 13859 '\n' + 13860 ' <md-button class="md-icon-button" type="button" ng-click="$pagination.previous()" ng-disabled="$pagination.disabled || !$pagination.hasPrevious()" aria-label="Previous">\n' + 13861 ' <md-icon md-svg-icon="navigate-before.svg"></md-icon>\n' + 13862 ' </md-button>\n' + 13863 '\n' + 13864 ' <md-button class="md-icon-button" type="button" ng-click="$pagination.next()" ng-disabled="$pagination.disabled || !$pagination.hasNext()" aria-label="Next">\n' + 13865 ' <md-icon md-svg-icon="navigate-next.svg"></md-icon>\n' + 13866 ' </md-button>\n' + 13867 '\n' + 13868 ' <md-button class="md-icon-button" type="button" ng-if="$pagination.showBoundaryLinks()" ng-click="$pagination.last()" ng-disabled="$pagination.disabled || !$pagination.hasNext()" aria-label="Last">\n' + 13869 ' <md-icon md-svg-icon="navigate-last.svg"></md-icon>\n' + 13870 ' </md-button>\n' + 13871 '</div>'); 13872}]); 13873 13874angular.module('md-table-progress.html', []).run(['$templateCache', function($templateCache) { 13875 $templateCache.put('md-table-progress.html', 13876 '<tr>\n' + 13877 ' <th colspan="{{columnCount()}}">\n' + 13878 ' <md-progress-linear ng-show="deferred()" md-mode="indeterminate"></md-progress-linear>\n' + 13879 ' </th>\n' + 13880 '</tr>'); 13881}]); 13882 13883angular.module('arrow-up.svg', []).run(['$templateCache', function($templateCache) { 13884 $templateCache.put('arrow-up.svg', 13885 '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"/></svg>'); 13886}]); 13887 13888angular.module('navigate-before.svg', []).run(['$templateCache', function($templateCache) { 13889 $templateCache.put('navigate-before.svg', 13890 '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></svg>'); 13891}]); 13892 13893angular.module('navigate-first.svg', []).run(['$templateCache', function($templateCache) { 13894 $templateCache.put('navigate-first.svg', 13895 '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
13895<path d="M7 6 v12 h2 v-12 h-2z M17.41 7.41L16 6l-6 6 6 6 1.41-1.41L12.83 12z"/></svg>'); 13896}]); 13897 13898angular.module('navigate-last.svg', []).run(['$templateCache', function($templateCache) { 13899 $templateCache.put('navigate-last.svg', 13900 '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M15 6 v12 h2 v-12 h-2z M8 6L6.59 7.41 11.17 12l-4.58 4.59L8 18l6-6z"/></svg>'); 13901}]); 13902 13903angular.module('navigate-next.svg', []).run(['$templateCache', function($templateCache) { 13904 $templateCache.put('navigate-next.svg', 13905 '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>'); 13906}]); 13907 13908 13909angular.module('md.data.table', ['md.table.templates']); 13910 13911angular.module('md.data.table').directive('mdBody', mdBody); 13912 13913function mdBody() { 13914 13915 function compile(tElement) { 13916 tElement.addClass('md-body'); 13917 } 13918 13919 return { 13920 compile: compile, 13921 restrict: 'A' 13922 }; 13923} 13924 13925angular.module('md.data.table').directive('mdCell', mdCell); 13926 13927function mdCell() { 13928 13929 function compile(tElement) { 13930 var select = tElement.find('md-select'); 13931 13932 if(select.length) { 13933 select.addClass('md-table-select').attr('md-container-class', 'md-table-select'); 13934 } 13935 13936 tElement.addClass('md-cell'); 13937 13938 return postLink; 13939 } 13940 13941 // empty controller to be bind properties to in postLink function 13942 function Controller() { 13943 13944 } 13945 13946 function postLink(scope, element, attrs, ctrls) { 13947 var select = element.find('md-select'); 13948 var cellCtrl = ctrls.shift(); 13949 var tableCtrl = ctrls.shift(); 13950 13951 if(attrs.ngClick) { 13952 element.addClass('md-clickable'); 13953 } 13954 13955 if(select.length) { 13956 select.on('click', function (event) { 13957 event.stopPropagation(); 13958 }); 13959 13960 element.addClass('md-clickable').on('click', function (event) { 13961 event.stopPropagation(); 13962 select[0].click(); 13963 }); 13964 } 13965 13966 cellCtrl.getTable = tableCtrl.getElement; 13967 13968 function getColumn() { 13969 return tableCtrl.$$columns[getIndex()]; 13970 } 13971 13972 function getIndex() { 13973 return Array.prototype.indexOf.call(element.parent().children(), element[0]); 13974 } 13975 13976 scope.$watch(getColumn, function (column) { 13977 if(!column) { 13978 return; 13979 } 13980 13981 if(column.numeric) { 13982 element.addClass('md-numeric'); 13983 } else { 13984 element.removeClass('md-numeric'); 13985 } 13986 }); 13987 } 13988 13989 return { 13990 controller: Controller, 13991 compile: compile, 13992 require: ['mdCell', '^^mdTable'], 13993 restrict: 'A' 13994 }; 13995} 13996 13997angular.module('md.data.table').directive('mdColumn', mdColumn); 13998 13999function mdColumn($compile, $mdUtil) { 14000 14001 function compile(tElement) { 14002 tElement.addClass('md-column'); 14003 return postLink; 14004 } 14005 14006 function postLink(scope, element, attrs, ctrls) { 14007 var headCtrl = ctrls.shift(); 14008 var tableCtrl = ctrls.shift(); 14009 14010 function attachSortIcon() { 14011 var sortIcon = angular.element('<md-icon md-svg-icon="arrow-up.svg">'); 14012 14013 $compile(sortIcon.addClass('md-sort-icon').attr('ng-class', 'getDirection()'))(scope); 14014 14015 if(element.hasClass('md-numeric')) { 14016 element.prepend(sortIcon); 14017 } else { 14018 element.append(sortIcon); 14019 } 14020 } 14021 14022 function detachSortIcon() { 14023 Array.prototype.some.call(element.find('md-icon'), function (icon) { 14024 return icon.classList.contains('md-sort-icon') && element[0].removeChild(icon); 14025 }); 14026 } 14027 14028 function disableSorting() { 14029 detachSortIcon(); 14030 element.removeClass('md-sort').off('click', setOrder); 14031 } 14032 14033 function enableSorting() { 14034 attachSortIcon(); 14035 element.addClass('md-sort').on('click', setOrder); 14036 } 14037 14038 function getIndex() { 14039 return Array.prototype.indexOf.call(element.parent().children(), element[0]); 14040 } 14041 14042 function isActive() { 14043 return scope.orderBy && (headCtrl.order === scope.orderBy || headCtrl.order === '-' + scope.orderBy); 14044 } 14045 14046 function isNumeric() { 14047 return attrs.mdNumeric === '' || scope.numeric; 14048 } 14049 14050 function setOrder() { 14051 scope.$applyAsync(function () { 14052 if(isActive()) { 14053 headCtrl.order = scope.getDirection() === 'md-asc' ? '-' + scope.orderBy : scope.orderBy; 14054 } else { 14055 headCtrl.order = scope.getDirection() === 'md-asc' ? scope.orderBy : '-' + scope.orderBy; 14056 } 14057 14058 if(angular.isFunction(headCtrl.onReorder)) { 14059 $mdUtil.nextTick(function () { 14060 headCtrl.onReorder(headCtrl.order); 14061 }); 14062 } 14063 }); 14064 } 14065 14066 function updateColumn(index, column) { 14067 tableCtrl.$$columns[index] = column; 14068 14069 if(column.numeric) { 14070 element.addClass('md-numeric'); 14071 } else { 14072 element.removeClass('md-numeric'); 14073 } 14074 } 14075 14076 scope.getDirection = function () { 14077 if(isActive()) { 14078 return headCtrl.order.charAt(0) === '-' ? 'md-desc' : 'md-asc'; 14079 } 14080 14081 return attrs.mdDesc === '' || scope.$eval(attrs.mdDesc) ? 'md-desc' : 'md-asc'; 14082 }; 14083 14084 scope.$watch(isActive, function (active) { 14085 if(active) { 14086 element.addClass('md-active'); 14087 } else { 14088 element.removeClass('md-active'); 14089 } 14090 }); 14091 14092 scope.$watch(getIndex, function (index) { 14093 updateColumn(index, {'numeric': isNumeric()}); 14094 }); 14095 14096 scope.$watch(isNumeric, function (numeric) { 14097 updateColumn(getIndex(), {'numeric': numeric}); 14098 }); 14099 14100 scope.$watch('orderBy', function (orderBy) { 14101 if(orderBy) { 14102 if(!element.hasClass('md-sort')) { 14103 enableSorting(); 14104 } 14105 } else if(element.hasClass('md-sort')) { 14106 disableSorting(); 14107 } 14108 }); 14109 } 14110 14111 return { 14112 compile: compile, 14113 require: ['^^mdHead', '^^mdTable'], 14114 restrict: 'A', 14115 scope: { 14116 numeric: '=?mdNumeric', 14117 orderBy: '@?mdOrderBy' 14118 } 14119 }; 14120} 14121 14122mdColumn.$inject = ['$compile', '$mdUtil']; 14123 14124angular.module('md.data.table') 14125 .decorator('$controller', controllerDecorator) 14126 .factory('$mdEditDialog', mdEditDialog); 14127 14128/* 14129 * A decorator for ng.$controller to optionally bind properties to the 14130 * controller before invoking the constructor. Stolen from the ngMock. 14131 *
14132 * https://docs.angularjs.org/api/ngMock/service/$controller 14133 */ 14134function controllerDecorator($delegate) { 14135 return function(expression, locals, later, ident) { 14136 if(later && typeof later === 'object') { 14137 var create = $delegate(expression, locals, true, ident); 14138 angular.extend(create.instance, later); 14139 return create(); 14140 } 14141 return $delegate(expression, locals, later, ident); 14142 }; 14143} 14144 14145controllerDecorator.$inject = ['$delegate']; 14146 14147function mdEditDialog($compile, $controller, $document, $mdUtil, $q, $rootScope, $templateCache, $templateRequest, $window) { 14148 /* jshint validthis: true */ 14149 14150 var ESCAPE = 27; 14151 14152 var busy = false; 14153 var body = angular.element($document.prop('body')); 14154 14155 /* 14156 * bindToController 14157 * controller 14158 * controllerAs 14159 * locals 14160 * resolve 14161 * scope 14162 * targetEvent 14163 * template 14164 * templateUrl 14165 */ 14166 var defaultOptions = { 14167 clickOutsideToClose: true, 14168 disableScroll: true, 14169 escToClose: true, 14170 focusOnOpen: true 14171 }; 14172 14173 function build(template, options) { 14174 var scope = $rootScope.$new(); 14175 var element = $compile(template)(scope); 14176 var backdrop = $mdUtil.createBackdrop(scope, 'md-edit-dialog-backdrop'); 14177 var controller; 14178 14179 if(options.controller) { 14180 controller = getController(options, scope, {$element: element, $scope: scope}); 14181 } else { 14182 angular.extend(scope, options.scope); 14183 } 14184 14185 if(options.disableScroll) { 14186 disableScroll(element); 14187 } 14188 14189 body.prepend(backdrop).append(element.addClass('md-whiteframe-1dp')); 14190 14191 positionDialog(element, options.target); 14192 14193 if(options.focusOnOpen) { 14194 focusOnOpen(element); 14195 } 14196 14197 if(options.clickOutsideToClose) { 14198 backdrop.on('click', function () { 14199 element.remove(); 14200 }); 14201 } 14202 14203 if(options.escToClose) { 14204 escToClose(element); 14205 } 14206 14207 element.on('$destroy', function () { 14208 busy = false; 14209 backdrop.remove(); 14210 }); 14211 14212 return controller; 14213 } 14214 14215 function disableScroll(element) { 14216 var restoreScroll = $mdUtil.disableScrollAround(element, body); 14217 14218 element.on('$destroy', function () { 14219 restoreScroll(); 14220 }); 14221 } 14222 14223 function getController(options, scope, inject) { 14224 if(!options.controller) { 14225 return; 14226 } 14227 14228 if(options.resolve) { 14229 angular.extend(inject, options.resolve); 14230 } 14231 14232 if(options.locals) { 14233 angular.extend(inject, options.locals); 14234 } 14235 14236 if(options.controllerAs) { 14237 scope[options.controllerAs] = {}; 14238 14239 if(options.bindToController) { 14240 angular.extend(scope[options.controllerAs], options.scope); 14241 } else { 14242 angular.extend(scope, options.scope); 14243 } 14244 } else { 14245 angular.extend(scope, options.scope); 14246 } 14247 14248 if(options.bindToController) { 14249 return $controller(options.controller, inject, scope[options.controllerAs]); 14250 } else { 14251 return $controller(options.controller, inject); 14252 } 14253 } 14254 14255 function getTemplate(options) { 14256 return $q(function (resolve, reject) { 14257 var template = options.template; 14258 14259 function illegalType(type) { 14260 reject('Unexpected template value. Expected a string; received a ' + type + '.'); 14261 } 14262 14263 if(template) { 14264 return angular.isString(template) ? resolve(template) : illegalType(typeof template); 14265 } 14266 14267 if(options.templateUrl) { 14268 template = $templateCache.get(options.templateUrl); 14269 14270 if(template) { 14271 return resolve(template); 14272 } 14273 14274 var success = function (template) { 14275 return resolve(template); 14276 }; 14277 14278 var error = function () { 14279 return reject('Error retrieving template from URL.'); 14280 }; 14281 14282 return $templateRequest(options.templateUrl).then(success, error); 14283 } 14284 14285 reject('Template not provided.'); 14286 }); 14287 } 14288 14289 function logError(error) { 14290 busy = false; 14291 console.error(error); 14292 } 14293 14294 function escToClose(element) { 14295 var keyup = function (event) { 14296 if(event.keyCode === ESCAPE) { 14297 element.remove(); 14298 } 14299 }; 14300 14301 body.on('keyup', keyup); 14302 14303 element.on('$destroy', function () { 14304 body.off('keyup', keyup); 14305 }); 14306 } 14307 14308 function focusOnOpen(element) { 14309 $mdUtil.nextTick(function () { 14310 var autofocus = $mdUtil.findFocusTarget(element); 14311 14312 if(autofocus) { 14313 autofocus.focus(); 14314 } 14315 }, false); 14316 } 14317 14318 function positionDialog(element, target) { 14319 var table = angular.element(target).controller('mdCell').getTable(); 14320 14321 var getHeight = function () { 14322 return element.prop('clientHeight'); 14323 }; 14324 14325 var getSize = function () { 14326 return { 14327 width: getWidth(), 14328 height: getHeight() 14329 }; 14330 }; 14331 14332 var getTableBounds = function () { 14333 var parent = table.parent(); 14334 14335 if(parent.prop('tagName') === 'MD-TABLE-CONTAINER') { 14336 return parent[0].getBoundingClientRect(); 14337 } else { 14338 return table[0].getBoundingClientRect(); 14339 } 14340 }; 14341 14342 var getWidth = function () { 14343 return element.prop('clientWidth'); 14344 }; 14345 14346 var reposition = function () { 14347 var size = getSize(); 14348 var cellBounds = target.getBoundingClientRect(); 14349 var tableBounds = getTableBounds(); 14350 14351 if(size.width > tableBounds.right - cellBounds.left) { 14352 element.css('left', tableBounds.right - size.width + 'px'); 14353 } else { 14354 element.css('left', cellBounds.left + 'px'); 14355 } 14356 14357 if(size.height > tableBounds.bottom - cellBounds.top) { 14358 element.css('top', tableBounds.bottom - size.height + 'px'); 14359 } else { 14360 element.css('top', cellBounds.top + 1 + 'px'); 14361 } 14362 14363 element.css('minWidth', cellBounds.width + 'px'); 14364 }; 14365 14366 var watchWidth = $rootScope.$watch(getWidth, reposition); 14367 var watchHeight = $rootScope.$watch(getHeight, reposition); 14368 14369 $window.addEventListener('resize', reposition); 14370 14371 element.on('$destroy', function () { 14372 watchWidth(); 14373 watchHeight(); 14374 14375 $window.removeEventListener('resize', reposition); 14376 }); 14377 } 14378 14379 function preset(size, options) { 14380 14381 function getAttrs() { 14382 var attrs = 'type="' + (options.type || 'text') + '"'; 14383 14384 for(var attr in options.validators) { 14385 attrs += ' ' + attr + '="' + options.validators[attr] + '"'; 14386 } 14387 14388 return attrs; 14389 } 14390 14391 return { 14392 controller: ['$element', '$q', 'save', '$scope', function ($element, $q, save, $scope) {
14393 function update() { 14394 if($scope.editDialog.$invalid) { 14395 return $q.reject(); 14396 } 14397 14398 if(angular.isFunction(save)) { 14399 return $q.when(save($scope.editDialog.input)); 14400 } 14401 14402 return $q.resolve(); 14403 } 14404 14405 this.dismiss = function () { 14406 $element.remove(); 14407 }; 14408 14409 this.getInput = function () { 14410 return $scope.editDialog.input; 14411 }; 14412 14413 $scope.dismiss = this.dismiss; 14414 14415 $scope.submit = function () { 14416 update().then(function () { 14417 $scope.dismiss(); 14418 }); 14419 }; 14420 }], 14421 locals: { 14422 save: options.save 14423 }, 14424 scope: { 14425 cancel: options.cancel || 'Cancel', 14426 messages: options.messages, 14427 model: options.modelValue, 14428 ok: options.ok || 'Save', 14429 placeholder: options.placeholder, 14430 title: options.title, 14431 size: size 14432 }, 14433 template: 14434 '<md-edit-dialog>' + 14435 '<div layout="column" class="md-content">' + 14436 '<div ng-if="size === \'large\'" class="md-title">{{title || \'Edit\'}}</div>' + 14437 '<form name="editDialog" layout="column" ng-submit="submit(model)">' + 14438 '<md-input-container md-no-float>' + 14439 '<input name="input" ng-model="model" md-autofocus placeholder="{{placeholder}} "' + getAttrs() + '>' + 14440 '<div ng-messages="editDialog.input.$error">' + 14441 '<div ng-repeat="(key, message) in messages" ng-message="{{key}}">{{message}}</div>' + 14442 '</div>' + 14443 '</md-input-container>' + 14444 '</form>' + 14445 '</div>' + 14446 '<div ng-if="size === \'large\'" layout="row" layout-align="end" class="md-actions">' + 14447 '<md-button class="md-primary" ng-click="dismiss()">{{cancel}}</md-button>' + 14448 '<md-button class="md-primary" ng-click="submit()">{{ok}}</md-button>' + 14449 '</div>' + 14450 '</md-edit-dialog>' 14451 }; 14452 } 14453 14454 this.show = function (options) { 14455 if(busy) { 14456 return $q.reject(); 14457 } 14458 14459 busy = true; 14460 options = angular.extend({}, defaultOptions, options); 14461 14462 if(!options.targetEvent) { 14463 return logError('options.targetEvent is required to align the dialog with the table cell.'); 14464 } 14465 14466 if(!options.targetEvent.currentTarget.classList.contains('md-cell')) { 14467 return logError('The event target must be a table cell.'); 14468 } 14469 14470 if(options.bindToController && !options.controllerAs) { 14471 return logError('You must define options.controllerAs when options.bindToController is true.'); 14472 } 14473 14474 options.target = options.targetEvent.currentTarget; 14475 14476 var promise = getTemplate(options); 14477 var promises = [promise]; 14478 14479 for(var prop in options.resolve) { 14480 promise = options.resolve[prop]; 14481 promises.push($q.when(angular.isFunction(promise) ? promise() : promise)); 14482 } 14483 14484 promise = $q.all(promises); 14485 14486 promise['catch'](logError); 14487 14488 return promise.then(function (results) { 14489 var template = results.shift(); 14490 14491 for(var prop in options.resolve) { 14492 options.resolve[prop] = results.shift(); 14493 } 14494 14495 return build(template, options); 14496 }); 14497 }; 14498 14499 this.small = function (options) { 14500 return this.show(angular.extend({}, options, preset('small', options))); 14501 }.bind(this); 14502 14503 this.large = function (options) { 14504 return this.show(angular.extend({}, options, preset('large', options))); 14505 }.bind(this); 14506 14507 return this; 14508} 14509 14510mdEditDialog.$inject = ['$compile', '$controller', '$document', '$mdUtil', '$q', '$rootScope', '$templateCache', '$templateRequest', '$window']; 14511 14512 14513angular.module('md.data.table').directive('mdFoot', mdFoot); 14514 14515function mdFoot() { 14516 14517 function compile(tElement) { 14518 tElement.addClass('md-foot'); 14519 } 14520 14521 return { 14522 compile: compile, 14523 restrict: 'A' 14524 }; 14525} 14526 14527angular.module('md.data.table').directive('mdHead', mdHead); 14528 14529function mdHead($compile) { 14530 14531 function compile(tElement) { 14532 tElement.addClass('md-head'); 14533 return postLink; 14534 } 14535 14536 // empty controller to be bind scope properties to 14537 function Controller() { 14538 14539 } 14540 14541 function postLink(scope, element, attrs, tableCtrl) { 14542 // because scope.$watch is unpredictable 14543 var oldValue = new Array(2); 14544 14545 function addCheckboxColumn() { 14546 element.children().prepend('<th class="md-column md-checkbox-column">'); 14547 } 14548 14549 function attatchCheckbox() { 14550 element.prop('lastElementChild').firstElementChild.appendChild($compile(createCheckBox())(scope)[0]); 14551 } 14552 14553 function createCheckBox() { 14554 return angular.element('<md-checkbox>').attr({ 14555 'aria-label': 'Select All', 14556 'ng-click': 'toggleAll()', 14557 'ng-checked': 'allSelected()', 14558 'ng-disabled': '!getSelectableRows().length' 14559 }); 14560 } 14561 14562 function detachCheckbox() { 14563 var cell = element.prop('lastElementChild').firstElementChild; 14564 14565 if(cell.classList.contains('md-checkbox-column')) { 14566 angular.element(cell).empty(); 14567 } 14568 } 14569 14570 function enableRowSelection() { 14571 return tableCtrl.$$rowSelect; 14572 } 14573 14574 function mdSelectCtrl(row) { 14575 return angular.element(row).controller('mdSelect'); 14576 } 14577 14578 function removeCheckboxColumn() { 14579 Array.prototype.some.call(element.find('th'), function (cell) { 14580 return cell.classList.contains('md-checkbox-column') && cell.remove(); 14581 }); 14582 } 14583 14584 scope.allSelected = function () { 14585 var rows = scope.getSelectableRows(); 14586 14587 return rows.length && rows.every(function (row) { 14588 return row.isSelected(); 14589 }); 14590 }; 14591 14592 scope.getSelectableRows = function () { 14593 return tableCtrl.getBodyRows().map(mdSelectCtrl).filter(function (ctrl) { 14594 return ctrl && !ctrl.disabled; 14595 }); 14596 }; 14597 14598 scope.selectAll = function () { 14599 tableCtrl.getBodyRows().map(mdSelectCtrl).forEach(function (ctrl) { 14600 if(ctrl && !ctrl.isSelected()) { 14601 ctrl.select(); 14602 } 14603 }); 14604 }; 14605 14606 scope.toggleAll = function () { 14607 return scope.allSelected() ? scope.unSelectAll() : scope.selectAll(); 14608 }; 14609 14610 scope.unSelectAll = function () { 14611 tableCtrl.getBodyRows().map(mdSelectCtrl).forEach(function (ctrl) { 14612 if(ctrl && ctrl.isSelected()) { 14613 ctrl.deselect(); 14614 } 14615 }); 14616 }; 14617 14618 scope.$watchGroup([enableRowSelection, tableCtrl.enableMultiSelect], function (newValue) { 14619 if(newValue[0] !== oldValue[0]) { 14620 if(newValue[0]) { 14621 addCheckboxColumn(); 14622 14623 if(newValue[1]) { 14624 attatchCheckbox(); 14625 } 14626 } else { 14627 removeCheckboxColumn(); 14628 } 14629 } else if(newValue[0] && newValue[1] !== oldValue[1]) { 14630 if(newValue[1]) { 14631 attatchCheckbox(); 14632 } else { 14633 detachCheckbox(); 14634 } 14635 } 14636 14637 angular.copy(newValue, oldValue); 14638 }); 14639 } 14640 14641 return { 14642 bindToController: true, 14643 compile: compile, 14644 controller: Controller, 14645 controllerAs: '$mdHead', 14646 require: '^^mdTable', 14647 restrict: 'A', 14648 scope: { 14649 order: '=?mdOrder', 14650 onReorder: '=?mdOnReorder' 14651 } 14652 }; 14653} 14654 14655mdHead.$inject = ['$compile']; 14656 14657angular.module('md.data.table').directive('mdRow', mdRow); 14658 14659function mdRow() { 14660 14661 function compile(tElement) { 14662 tElement.addClass('md-row'); 14663 return postLink; 14664 } 14665 14666 function postLink(scope, element, attrs, tableCtrl) { 14667 function enableRowSelection() { 14668 return tableCtrl.$$rowSelect; 14669 } 14670 14671 function isBodyRow() { 14672 return tableCtrl.getBodyRows().indexOf(element[0]) !== -1; 14673 } 14674 14675 function isChild(node) { 14676 return element[0].contains(node[0]); 14677 } 14678 14679 if(isBodyRow()) { 14680 var cell = angular.element('<td class="md-cell">'); 14681 14682 scope.$watch(enableRowSelection, function (enable) { 14683 // if a row is not selectable, prepend an empty cell to it 14684 if(enable && !attrs.mdSelect) { 14685 if(!isChild(cell)) {
14686 element.prepend(cell); 14687 } 14688 return; 14689 } 14690 14691 if(isChild(cell)) { 14692 cell.remove(); 14693 } 14694 }); 14695 } 14696 } 14697 14698 return { 14699 compile: compile, 14700 require: '^^mdTable', 14701 restrict: 'A' 14702 }; 14703} 14704 14705angular.module('md.data.table').directive('mdSelect', mdSelect); 14706 14707function mdSelect($compile, $parse) { 14708 14709 // empty controller to bind scope properties to 14710 function Controller() { 14711 14712 } 14713 14714 function postLink(scope, element, attrs, ctrls) { 14715 var self = ctrls.shift(); 14716 var tableCtrl = ctrls.shift(); 14717 var getId = $parse(attrs.mdSelectId); 14718 14719 self.id = getId(self.model); 14720 14721 if(tableCtrl.$$rowSelect && self.id) { 14722 if(tableCtrl.$$hash.has(self.id)) { 14723 var index = tableCtrl.selected.indexOf(tableCtrl.$$hash.get(self.id)); 14724 14725 // if the item is no longer selected remove it 14726 if(index === -1) { 14727 tableCtrl.$$hash.purge(self.id); 14728 } 14729 14730 // if the item is not a reference to the current model update the reference 14731 else if(!tableCtrl.$$hash.equals(self.id, self.model)) { 14732 tableCtrl.$$hash.update(self.id, self.model); 14733 tableCtrl.selected.splice(index, 1, self.model); 14734 } 14735 14736 } else { 14737 14738 // check if the item has been selected 14739 tableCtrl.selected.some(function (item, index) { 14740 if(getId(item) === self.id) { 14741 tableCtrl.$$hash.update(self.id, self.model); 14742 tableCtrl.selected.splice(index, 1, self.model); 14743 14744 return true; 14745 } 14746 }); 14747 } 14748 } 14749 14750 self.isSelected = function () { 14751 if(!tableCtrl.$$rowSelect) { 14752 return false; 14753 } 14754 14755 if(self.id) { 14756 return tableCtrl.$$hash.has(self.id); 14757 } 14758 14759 return tableCtrl.selected.indexOf(self.model) !== -1; 14760 }; 14761 14762 self.select = function () { 14763 if(self.disabled) { 14764 return; 14765 } 14766 14767 if(tableCtrl.enableMultiSelect()) { 14768 tableCtrl.selected.push(self.model); 14769 } else { 14770 tableCtrl.selected.splice(0, tableCtrl.selected.length, self.model); 14771 } 14772 14773 if(angular.isFunction(self.onSelect)) { 14774 self.onSelect(self.model); 14775 } 14776 }; 14777 14778 self.deselect = function () { 14779 if(self.disabled) { 14780 return; 14781 } 14782 14783 tableCtrl.selected.splice(tableCtrl.selected.indexOf(self.model), 1); 14784 14785 if(angular.isFunction(self.onDeselect)) { 14786 self.onDeselect(self.model); 14787 } 14788 }; 14789 14790 self.toggle = function (event) { 14791 if(event && event.stopPropagation) { 14792 event.stopPropagation(); 14793 } 14794 14795 return self.isSelected() ? self.deselect() : self.select(); 14796 }; 14797 14798 function autoSelect() { 14799 return attrs.mdAutoSelect === '' || self.autoSelect; 14800 } 14801 14802 function createCheckbox() { 14803 var checkbox = angular.element('<md-checkbox>').attr({ 14804 'aria-label': 'Select Row', 14805 'ng-click': '$mdSelect.toggle($event)', 14806 'ng-checked': '$mdSelect.isSelected()', 14807 'ng-disabled': '$mdSelect.disabled' 14808 }); 14809 14810 return angular.element('<td class="md-cell md-checkbox-cell">').append($compile(checkbox)(scope)); 14811 } 14812 14813 function disableSelection() { 14814 Array.prototype.some.call(element.children(), function (child) { 14815 return child.classList.contains('md-checkbox-cell') && element[0].removeChild(child); 14816 }); 14817 14818 if(autoSelect()) { 14819 element.off('click', toggle); 14820 } 14821 } 14822 14823 function enableSelection() { 14824 element.prepend(createCheckbox()); 14825 14826 if(autoSelect()) { 14827 element.on('click', toggle); 14828 } 14829 } 14830 14831 function enableRowSelection() { 14832 return tableCtrl.$$rowSelect; 14833 } 14834 14835 function onSelectChange(selected) { 14836 if(!self.id) { 14837 return; 14838 } 14839 14840 if(tableCtrl.$$hash.has(self.id)) { 14841 // check if the item has been deselected 14842 if(selected.indexOf(tableCtrl.$$hash.get(self.id)) === -1) { 14843 tableCtrl.$$hash.purge(self.id); 14844 } 14845 14846 return; 14847 } 14848 14849 // check if the item has been selected 14850 if(selected.indexOf(self.model) !== -1) { 14851 tableCtrl.$$hash.update(self.id, self.model); 14852 } 14853 } 14854 14855 function toggle(event) { 14856 scope.$applyAsync(function () { 14857 self.toggle(event); 14858 }); 14859 } 14860 14861 scope.$watch(enableRowSelection, function (enable) { 14862 if(enable) { 14863 enableSelection(); 14864 } else { 14865 disableSelection(); 14866 } 14867 }); 14868 14869 scope.$watch(autoSelect, function (newValue, oldValue) { 14870 if(newValue === oldValue) { 14871 return; 14872 } 14873 14874 if(tableCtrl.$$rowSelect && newValue) { 14875 element.on('click', toggle); 14876 } else { 14877 element.off('click', toggle); 14878 } 14879 }); 14880 14881 scope.$watch(self.isSelected, function (isSelected) { 14882 return isSelected ? element.addClass('md-selected') : element.removeClass('md-selected'); 14883 }); 14884 14885 scope.$watch(tableCtrl.enableMultiSelect, function (multiple) { 14886 if(tableCtrl.$$rowSelect && !multiple) { 14887 // remove all but the first selected item 14888 tableCtrl.selected.splice(1); 14889 } 14890 }); 14891 14892 tableCtrl.registerModelChangeListener(onSelectChange); 14893 14894 element.on('$destroy', function () { 14895 tableCtrl.removeModelChangeListener(onSelectChange); 14896 }); 14897 } 14898 14899 return { 14900 bindToController: true, 14901 controller: Controller, 14902 controllerAs: '$mdSelect', 14903 link: postLink, 14904 require: ['mdSelect', '^^mdTable'], 14905 restrict: 'A', 14906 scope: { 14907 model: '=mdSelect', 14908 disabled: '=ngDisabled', 14909 onSelect: '=?mdOnSelect', 14910 onDeselect: '=?mdOnDeselect', 14911 autoSelect: '=mdAutoSelect' 14912 } 14913 }; 14914} 14915 14916mdSelect.$inject = ['$compile', '$parse']; 14917 14918angular.module('md.data.table').directive('mdTable', mdTable); 14919 14920function Hash() { 14921 var keys = {}; 14922 14923 this.equals = function (key, item) { 14924 return keys[key] === item; 14925 }; 14926 14927 this.get = function (key) { 14928 return keys[key]; 14929 }; 14930 14931 this.has = function (key) { 14932 return keys.hasOwnProperty(key); 14933 }; 14934 14935 this.purge = function (key) { 14936 delete keys[key]; 14937 }; 14938 14939 this.update = function (key, item) { 14940 keys[key] = item; 14941 }; 14942} 14943 14944function mdTable() { 14945
14946 function compile(tElement, tAttrs) { 14947 tElement.addClass('md-table'); 14948 14949 if(tAttrs.hasOwnProperty('mdProgress')) { 14950 var body = tElement.find('tbody')[0]; 14951 var progress = angular.element('<thead class="md-table-progress" md-table-progress>'); 14952 14953 if(body) { 14954 tElement[0].insertBefore(progress[0], body); 14955 } 14956 } 14957 } 14958 14959 function Controller($attrs, $element, $q, $scope) { 14960 var self = this; 14961 var queue = []; 14962 var watchListener; 14963 var modelChangeListeners = []; 14964 14965 self.$$hash = new Hash(); 14966 self.$$columns = {}; 14967 14968 function enableRowSelection() { 14969 self.$$rowSelect = true; 14970 14971 watchListener = $scope.$watchCollection('$mdTable.selected', function (selected) { 14972 modelChangeListeners.forEach(function (listener) { 14973 listener(selected); 14974 }); 14975 }); 14976 14977 $element.addClass('md-row-select'); 14978 } 14979 14980 function disableRowSelection() { 14981 self.$$rowSelect = false; 14982 14983 if(angular.isFunction(watchListener)) { 14984 watchListener(); 14985 } 14986 14987 $element.removeClass('md-row-select'); 14988 } 14989 14990 function resolvePromises() { 14991 if(!queue.length) { 14992 return $scope.$applyAsync(); 14993 } 14994 14995 queue[0]['finally'](function () { 14996 queue.shift(); 14997 resolvePromises(); 14998 }); 14999 } 15000 15001 function rowSelect() { 15002 return $attrs.mdRowSelect === '' || self.rowSelect; 15003 } 15004 15005 function validateModel() { 15006 if(!self.selected) { 15007 return console.error('Row selection: ngModel is not defined.'); 15008 } 15009 15010 if(!angular.isArray(self.selected)) { 15011 return console.error('Row selection: Expected an array. Recived ' + typeof self.selected + '.'); 15012 } 15013 15014 return true; 15015 } 15016 15017 self.columnCount = function () { 15018 return self.getRows($element[0]).reduce(function (count, row) { 15019 return row.cells.length > count ? row.cells.length : count; 15020 }, 0); 15021 }; 15022 15023 self.getRows = function (element) { 15024 return Array.prototype.filter.call(element.rows, function (row) { 15025 return !row.classList.contains('ng-leave'); 15026 }); 15027 }; 15028 15029 self.getBodyRows = function () { 15030 return Array.prototype.reduce.call($element.prop('tBodies'), function (result, tbody) { 15031 return result.concat(self.getRows(tbody)); 15032 }, []); 15033 }; 15034 15035 self.getElement = function () { 15036 return $element; 15037 }; 15038 15039 self.getHeaderRows = function () { 15040 return self.getRows($element.prop('tHead')); 15041 }; 15042 15043 self.enableMultiSelect = function () { 15044 return $attrs.multiple === '' || $scope.$eval($attrs.multiple); 15045 }; 15046 15047 self.waitingOnPromise = function () { 15048 return !!queue.length; 15049 }; 15050 15051 self.queuePromise = function (promise) { 15052 if(!promise) { 15053 return; 15054 } 15055 15056 if(queue.push(angular.isArray(promise) ? $q.all(promise) : $q.when(promise)) === 1) { 15057 resolvePromises(); 15058 } 15059 }; 15060 15061 self.registerModelChangeListener = function (listener) { 15062 modelChangeListeners.push(listener); 15063 }; 15064 15065 self.removeModelChangeListener = function (listener) { 15066 var index = modelChangeListeners.indexOf(listener); 15067 15068 if(index !== -1) { 15069 modelChangeListeners.splice(index, 1); 15070 } 15071 }; 15072 15073 if($attrs.hasOwnProperty('mdProgress')) { 15074 $scope.$watch('$mdTable.progress', self.queuePromise); 15075 } 15076 15077 $scope.$watch(rowSelect, function (enable) { 15078 if(enable && !!validateModel()) { 15079 enableRowSelection(); 15080 } else { 15081 disableRowSelection(); 15082 } 15083 }); 15084 } 15085 15086 Controller.$inject = ['$attrs', '$element', '$q', '$scope']; 15087 15088 return { 15089 bindToController: true, 15090 compile: compile, 15091 controller: Controller, 15092 controllerAs: '$mdTable', 15093 restrict: 'A', 15094 scope: { 15095 progress: '=?mdProgress', 15096 selected: '=ngModel', 15097 rowSelect: '=mdRowSelect' 15098 } 15099 }; 15100} 15101 15102angular.module('md.data.table').directive('mdTablePagination', mdTablePagination); 15103 15104function mdTablePagination() { 15105 15106 function compile(tElement) { 15107 tElement.addClass('md-table-pagination'); 15108 } 15109 15110 function Controller($attrs, $mdUtil, $scope) { 15111 var self = this; 15112 var defaultLabel = { 15113 page: 'Page:', 15114 rowsPerPage: 'Rows per page:', 15115 of: 'of' 15116 }; 15117 15118 self.label = angular.copy(defaultLabel); 15119 15120 function isPositive(number) { 15121 return parseInt(number, 10) > 0; 15122 } 15123 15124 self.eval = function (expression) { 15125 return $scope.$eval(expression); 15126 }; 15127 15128 self.first = function () { 15129 self.page = 1; 15130 self.onPaginationChange(); 15131 }; 15132 15133 self.hasNext = function () { 15134 return self.page * self.limit < self.total; 15135 }; 15136 15137 self.hasPrevious = function () { 15138 return self.page > 1; 15139 }; 15140 15141 self.last = function () { 15142 self.page = self.pages(); 15143 self.onPaginationChange(); 15144 }; 15145 15146 self.max = function () { 15147 return self.hasNext() ? self.page * self.limit : self.total; 15148 }; 15149 15150 self.min = function () { 15151 return isPositive(self.total) ? self.page * self.limit - self.limit + 1 : 0; 15152 }; 15153 15154 self.next = function () { 15155 self.page++; 15156 self.onPaginationChange(); 15157 }; 15158 15159 self.onPaginationChange = function () { 15160 if(angular.isFunction(self.onPaginate)) { 15161 $mdUtil.nextTick(function () { 15162 self.onPaginate(self.page, self.limit); 15163 }); 15164 } 15165 }; 15166 15167 self.pages = function () { 15168 return isPositive(self.total) ? Math.ceil(self.total / (isPositive(self.limit) ? self.limit : 1)) : 1; 15169 }; 15170 15171 self.previous = function () { 15172 self.page--; 15173 self.onPaginationChange(); 15174 }; 15175 15176 self.showBoundaryLinks = function () { 15177 return $attrs.mdBoundaryLinks === '' || self.boundaryLinks; 15178 }; 15179 15180 self.showPageSelect = function () { 15181 return $attrs.mdPageSelect === '' || self.pageSelect; 15182 }; 15183 15184 $scope.$watch('$pagination.limit', function (newValue, oldValue) { 15185 if(isNaN(newValue) || isNaN(oldValue) || newValue === oldValue) { 15186 return; 15187 } 15188 15189 // find closest page from previous min 15190 self.page = Math.floor(((self.page * oldValue - oldValue) + newValue) / (isPositive(newValue) ? newValue : 1)); 15191 self.onPaginationChange(); 15192 }); 15193 15194 $attrs.$observe('mdLabel', function (label) { 15195 angular.extend(self.label, defaultLabel, $scope.$eval(label)); 15196 }); 15197 15198 $scope.$watch('$pagination.total', function (newValue, oldValue) { 15199 if(isNaN(newValue) || newValue === oldValue) { 15200 return; 15201 } 15202 15203 if(self.page > self.pages()) { 15204 self.last(); 15205 } 15206 }); 15207 } 15208 15209 Controller.$inject = ['$attrs', '$mdUtil', '$scope']; 15210 15211 return { 15212 bindToController: { 15213 boundaryLinks: '=?mdBoundaryLinks', 15214 disabled: '=ngDisabled', 15215 limit: '=mdLimit', 15216 page: '=mdPage', 15217 pageSelect: '=?mdPageSelect', 15218 onPaginate: '=?mdOnPaginate', 15219 limitOptions: '=?mdLimitOptions', 15220 total: '@mdTotal' 15221 }, 15222 compile: compile, 15223 controller: Controller, 15224 controllerAs: '$pagination', 15225 restrict: 'E', 15226 scope: {}, 15227 templateUrl: 'md-table-pagination.html' 15228 }; 15229} 15230 15231angular.module('md.data.table').directive('mdTableProgress', mdTableProgress); 15232 15233function mdTableProgress() { 15234 15235 function postLink(scope, element, attrs, tableCtrl) { 15236 scope.columnCount = tableCtrl.columnCount; 15237 scope.deferred = tableCtrl.waitingOnPromise; 15238 } 15239 15240 return { 15241 link: postLink, 15242 require: '^^mdTable', 15243 restrict: 'A', 15244 scope: {}, 15245 templateUrl: 'md-table-progress.html' 15246 }; 15247} 15248 15249angular.module('md.data.table').directive('virtualPageSelect', virtualPageSelect); 15250 15251function virtualPageSelect() { 15252 15253 function Controller($element, $scope) { 15254 var self = this; 15255 var content = $element.find('md-content'); 15256 15257 self.pages = []; 15258 15259 function getMin(pages, total) { 15260 return Math.min(pages, isFinite(total) && isPositive(total) ? total : 1); 15261 } 15262 15263 function isPositive(number) { 15264 return number > 0; 15265 } 15266 15267 function setPages(max) { 15268 if(self.pages.length > max) { 15269 return self.pages.splice(max); 15270 } 15271 15272 for(var i = self.pages.length; i < max; i++) { 15273 self.pages.push(i + 1); 15274 } 15275 } 15276 15277 content.on('scroll', function () { 15278 if((content.prop('clientHeight') + content.prop('scrollTop')) >= content.prop('scrollHeight')) { 15279 $scope.$applyAsync(function () { 15280 setPages(getMin(self.pages.length + 10, self.total)); 15281 }); 15282 } 15283 }); 15284 15285 $scope.$watch('$pageSelect.total', function (total) { 15286 setPages(getMin(Math.max(self.pages.length, 10), total)); 15287 }); 15288 15289 $scope.$watch('$pagination.page', function (page) { 15290 for(var i = self.pages.length; i < page; i++) { 15291 self.pages.push(i + 1); 15292 } 15293 }); 15294 } 15295 15296 Controller.$inject = ['$element', '$scope']; 15297 15298 return { 15299 bindToController: { 15300 total: '@' 15301 }, 15302 controller: Controller, 15303 controllerAs: '$pageSelect' 15304 }; 15305} 15306 15307})(window, angular);; 15308/*! 15309 * angular-ui-mask 15310 * https://github.com/angular-ui/ui-mask 15311 * Version: 1.8.7 - 2016-07-26T15:59:07.992Z 15312 * License: MIT 15313 */ 15314 15315 15316(function () { 15317 'use strict'; 15318 /* 15319 Attaches input mask onto input element 15320 */ 15321 angular.module('ui.mask', []) 15322 .value('uiMaskConfig', { 15323 maskDefinitions: { 15324 '9': /\d/, 15325 'A': /[a-zA-Z]/, 15326 '*': /[a-zA-Z0-9]/ 15327 }, 15328 clearOnBlur: true, 15329 clearOnBlurPlaceholder: false, 15330 escChar: '\\', 15331 eventsToHandle: ['input', 'keyup', 'click', 'focus'], 15332 addDefaultPlaceholder: true, 15333 allowInvalidValue: false 15334 }) 15335 .provider('uiMask.Config', function () { 15336 var options = {}; 15337 15338 this.maskDefinitions = function (maskDefinitions) { 15339 return options.maskDefinitions = maskDefinitions; 15340 }; 15341 this.clearOnBlur = function (clearOnBlur) { 15342 return options.clearOnBlur = clearOnBlur; 15343 }; 15344 this.clearOnBlurPlaceholder = function (clearOnBlurPlaceholder) { 15345 return options.clearOnBlurPlaceholder = clearOnBlurPlaceholder; 15346 }; 15347 this.eventsToHandle = function (eventsToHandle) { 15348 return options.eventsToHandle = eventsToHandle; 15349 }; 15350 this.addDefaultPlaceholder = function (addDefaultPlaceholder) { 15351 return options.addDefaultPlaceholder = addDefaultPlaceholder; 15352 }; 15353 this.allowInvalidValue = function (allowInvalidValue) { 15354 return options.allowInvalidValue = allowInvalidValue; 15355 }; 15356 this.$get = ['uiMaskConfig', function (uiMaskConfig) { 15357 var tempOptions = uiMaskConfig; 15358 for (var prop in options) { 15359 if (angular.isObject(options[prop]) && !angular.isArray(options[prop])) { 15360 angular.extend(tempOptions[prop], options[prop]); 15361 } else { 15362 tempOptions[prop] = options[prop]; 15363 } 15364 } 15365 15366 return tempOptions; 15367 }]; 15368 }) 15369 .directive('uiMask', ['uiMask.Config', function (maskConfig) { 15370 function isFocused(elem) { 15371 return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); 15372 } 15373 15374 return { 15375 priority: 100, 15376 require: 'ngModel', 15377 restrict: 'A', 15378 compile: function uiMaskCompilingFunction() { 15379 var options = angular.copy(maskConfig); 15380 15381 return function uiMaskLinkingFunction(scope, iElement, iAttrs, controller) { 15382 var maskProcessed = false, eventsBound = false, 15383 maskCaretMap, maskPatterns, maskPlaceholder, maskComponents, 15384 // Minimum required length of the value to be considered valid 15385 minRequiredLength, 15386 value, valueMasked, isValid, 15387 // Vars for initializing/uninitializing 15388 originalPlaceholder = iAttrs.placeholder, 15389 originalMaxlength = iAttrs.maxlength, 15390 // Vars used exclusively in eventHandler() 15391 oldValue, oldValueUnmasked, oldCaretPosition, oldSelectionLength,
15392 // Used for communicating if a backspace operation should be allowed between 15393 // keydownHandler and eventHandler 15394 preventBackspace; 15395 15396 var originalIsEmpty = controller.$isEmpty; 15397 controller.$isEmpty = function (value) { 15398 if (maskProcessed) { 15399 return originalIsEmpty(unmaskValue(value || '')); 15400 } else { 15401 return originalIsEmpty(value); 15402 } 15403 }; 15404 15405 function initialize(maskAttr) { 15406 if (!angular.isDefined(maskAttr)) { 15407 return uninitialize(); 15408 } 15409 processRawMask(maskAttr); 15410 if (!maskProcessed) { 15411 return uninitialize(); 15412 } 15413 initializeElement(); 15414 bindEventListeners(); 15415 return true; 15416 } 15417 15418 function initPlaceholder(placeholderAttr) { 15419 if (!placeholderAttr) { 15420 return; 15421 } 15422 15423 maskPlaceholder = placeholderAttr; 15424 15425 // If the mask is processed, then we need to update the value 15426 // but don't set the value if there is nothing entered into the element 15427 // and there is a placeholder attribute on the element because that 15428 // will only set the value as the blank maskPlaceholder 15429 // and override the placeholder on the element 15430 if (maskProcessed && !(iElement.val().length === 0 && angular.isDefined(iAttrs.placeholder))) { 15431 iElement.val(maskValue(unmaskValue(iElement.val()))); 15432 } 15433 } 15434 15435 function initPlaceholderChar() { 15436 return initialize(iAttrs.uiMask); 15437 } 15438 15439 var modelViewValue = false; 15440 iAttrs.$observe('modelViewValue', function (val) { 15441 if (val === 'true') { 15442 modelViewValue = true; 15443 } 15444 }); 15445 15446 iAttrs.$observe('allowInvalidValue', function (val) { 15447 linkOptions.allowInvalidValue = val === '' 15448 ? true 15449 : !!val; 15450 formatter(controller.$modelValue); 15451 }); 15452 15453 function formatter(fromModelValue) { 15454 if (!maskProcessed) { 15455 return fromModelValue; 15456 } 15457 value = unmaskValue(fromModelValue || ''); 15458 isValid = validateValue(value); 15459 controller.$setValidity('mask', isValid); 15460 15461 if (!value.length) return undefined; 15462 if (isValid || linkOptions.allowInvalidValue) { 15463 return maskValue(value); 15464 } else { 15465 return undefined; 15466 } 15467 } 15468 15469 function parser(fromViewValue) { 15470 if (!maskProcessed) { 15471 return fromViewValue; 15472 } 15473 value = unmaskValue(fromViewValue || ''); 15474 isValid = validateValue(value); 15475 // We have to set viewValue manually as the reformatting of the input 15476 // value performed by eventHandler() doesn't happen until after 15477 // this parser is called, which causes what the user sees in the input 15478 // to be out-of-sync with what the controller's $viewValue is set to. 15479 controller.$viewValue = value.length ? maskValue(value) : ''; 15480 controller.$setValidity('mask', isValid); 15481 15482 if (isValid || linkOptions.allowInvalidValue) { 15483 return modelViewValue ? controller.$viewValue : value; 15484 } 15485 } 15486 15487 var linkOptions = {}; 15488 15489 if (iAttrs.uiOptions) { 15490 linkOptions = scope.$eval('[' + iAttrs.uiOptions + ']'); 15491 if (angular.isObject(linkOptions[0])) { 15492 // we can't use angular.copy nor angular.extend, they lack the power to do a deep merge 15493 linkOptions = (function (original, current) { 15494 for (var i in original) { 15495 if (Object.prototype.hasOwnProperty.call(original, i)) { 15496 if (current[i] === undefined) { 15497 current[i] = angular.copy(original[i]); 15498 } else { 15499 if (angular.isObject(current[i]) && !angular.isArray(current[i])) { 15500 current[i] = angular.extend({}, original[i], current[i]); 15501 } 15502 } 15503 } 15504 } 15505 return current; 15506 })(options, linkOptions[0]); 15507 } else { 15508 linkOptions = options; //gotta be a better way to do this.. 15509 } 15510 } else { 15511 linkOptions = options; 15512 } 15513 15514 iAttrs.$observe('uiMask', initialize); 15515 if (angular.isDefined(iAttrs.uiMaskPlaceholder)) { 15516 iAttrs.$observe('uiMaskPlaceholder', initPlaceholder); 15517 } 15518 else { 15519 iAttrs.$observe('placeholder', initPlaceholder); 15520 } 15521 if (angular.isDefined(iAttrs.uiMaskPlaceholderChar)) { 15522 iAttrs.$observe('uiMaskPlaceholderChar', initPlaceholderChar); 15523 } 15524 15525 controller.$formatters.unshift(formatter); 15526 controller.$parsers.unshift(parser); 15527 15528 function uninitialize() { 15529 maskProcessed = false; 15530 unbindEventListeners(); 15531 15532 if (angular.isDefined(originalPlaceholder)) { 15533 iElement.attr('placeholder', originalPlaceholder); 15534 } else { 15535 iElement.removeAttr('placeholder'); 15536 } 15537 15538 if (angular.isDefined(originalMaxlength)) { 15539 iElement.attr('maxlength', originalMaxlength); 15540 } else { 15541 iElement.removeAttr('maxlength'); 15542 } 15543 15544 iElement.val(controller.$modelValue); 15545 controller.$viewValue = controller.$modelValue; 15546 return false; 15547 } 15548 15549 function initializeElement() { 15550 value = oldValueUnmasked = unmaskValue(controller.$modelValue || ''); 15551 valueMasked = oldValue = maskValue(value); 15552 isValid = validateValue(value); 15553 if (iAttrs.maxlength) { // Double maxlength to allow pasting new val at end of mask 15554 iElement.attr('maxlength', maskCaretMap[maskCaretMap.length - 1] * 2); 15555 } 15556 if (!originalPlaceholder && linkOptions.addDefaultPlaceholder) { 15557 iElement.attr('placeholder', maskPlaceholder); 15558 } 15559 var viewValue = controller.$modelValue; 15560 var idx = controller.$formatters.length; 15561 while (idx--) { 15562 viewValue = controller.$formatters[idx](viewValue); 15563 } 15564 controller.$viewValue = viewValue || ''; 15565 controller.$render(); 15566 // Not using $setViewValue so we don't clobber the model value and dirty the form 15567 // without any kind of user interaction. 15568 } 15569 15570 function bindEventListeners() { 15571 if (eventsBound) { 15572 return; 15573 } 15574 iElement.bind('blur', blurHandler); 15575 iElement.bind('mousedown mouseup', mouseDownUpHandler); 15576 iElement.bind('keydown', keydownHandler); 15577 iElement.bind(linkOptions.eventsToHandle.join(' '), eventHandler); 15578 eventsBound = true; 15579 } 15580 15581 function unbindEventListeners() { 15582 if (!eventsBound) { 15583 return; 15584 } 15585 iElement.unbind('blur', blurHandler); 15586 iElement.unbind('mousedown', mouseDownUpHandler); 15587 iElement.unbind('mouseup', mouseDownUpHandler); 15588 iElement.unbind('keydown', keydownHandler); 15589 iElement.unbind('input', eventHandler); 15590 iElement.unbind('keyup', eventHandler); 15591 iElement.unbind('click', eventHandler); 15592 iElement.unbind('focus', eventHandler); 15593 eventsBound = false; 15594 } 15595 15596 function validateValue(value) { 15597 // Zero-length value validity is ngRequired's determination 15598 return value.length ? value.length >= minRequiredLength : true; 15599 } 15600 15601 function unmaskValue(value) { 15602 var valueUnmasked = '', 15603 input = iElement[0], 15604 maskPatternsCopy = maskPatterns.slice(), 15605 selectionStart = oldCaretPosition, 15606 selectionEnd = selectionStart + getSelectionLength(input), 15607 valueOffset, valueDelta, tempValue = ''; 15608 // Preprocess by stripping mask components from value 15609 value = value.toString(); 15610 valueOffset = 0; 15611 valueDelta = value.length - maskPlaceholder.length; 15612 angular.forEach(maskComponents, function (component) { 15613 var position = component.position; 15614 //Only try and replace the component if the component position is not within the selected range 15615 //If component was in selected range then it was removed with the user input so no need to try and remove that component 15616 if (!(position >= selectionStart && position < selectionEnd)) { 15617 if (position >= selectionStart) { 15618 position += valueDelta; 15619 } 15620 if (value.substring(position, position + component.value.length) === component.value) { 15621 tempValue += value.slice(valueOffset, position);// + value.slice(position + component.value.length); 15622 valueOffset = position + component.value.length; 15623 } 15624 } 15625 }); 15626 value = tempValue + value.slice(valueOffset); 15627 angular.forEach(value.split(''), function (chr) { 15628 if (maskPatternsCopy.length && maskPatternsCopy[0].test(chr)) { 15629 valueUnmasked += chr; 15630 maskPatternsCopy.shift(); 15631 } 15632 }); 15633 15634 return valueUnmasked; 15635 } 15636 15637 function maskValue(unmaskedValue) { 15638 var valueMasked = '', 15639 maskCaretMapCopy = maskCaretMap.slice(); 15640 15641 angular.forEach(maskPlaceholder.split(''), function (chr, i) { 15642 if (unmaskedValue.length && i === maskCaretMapCopy[0]) { 15643 valueMasked += unmaskedValue.charAt(0) || '_'; 15644 unmaskedValue = unmaskedValue.substr(1); 15645 maskCaretMapCopy.shift(); 15646 } 15647 else { 15648 valueMasked += chr; 15649 } 15650 }); 15651 return valueMasked; 15652 } 15653 15654 function getPlaceholderChar(i) { 15655 var placeholder = angular.isDefined(iAttrs.uiMaskPlaceholder) ? iAttrs.uiMaskPlaceholder : iAttrs.placeholder, 15656 defaultPlaceholderChar; 15657 15658 if (angular.isDefined(placeholder) && placeholder[i]) { 15659 return placeholder[i]; 15660 } else { 15661 defaultPlaceholderChar = angular.isDefined(iAttrs.uiMaskPlaceholderChar) && iAttrs.uiMaskPlaceholderChar ? iAttrs.uiMaskPlaceholderChar : '_'; 15662 return (defaultPlaceholderChar.toLowerCase() === 'space') ? ' ' : defaultPlaceholderChar[0]; 15663 } 15664 } 15665 15666 // Generate array of mask components that will be stripped from a masked value 15667 // before processing to prevent mask components from being added to the unmasked value. 15668 // E.g., a mask pattern of '+7 9999' won't have the 7 bleed into the unmasked value. 15669 function getMaskComponents() { 15670 var maskPlaceholderChars = maskPlaceholder.split(''), 15671 maskPlaceholderCopy, components; 15672 15673 //maskCaretMap can have bad values if the input has the ui-mask attribute implemented as an obversable property, e.g. the demo page 15674 if (maskCaretMap && !isNaN(maskCaretMap[0])) { 15675 //Instead of trying to manipulate the RegEx based on the placeholder characters 15676 //we can simply replace the placeholder characters based on the already built 15677 //maskCaretMap to underscores and leave the orig
15677inal working RegEx to get the proper 15678 //mask components 15679 angular.forEach(maskCaretMap, function (value) { 15680 maskPlaceholderChars[value] = '_'; 15681 }); 15682 } 15683 maskPlaceholderCopy = maskPlaceholderChars.join(''); 15684 components = maskPlaceholderCopy.replace(/[_]+/g, '_').split('_'); 15685 components = components.filter(function (s) { 15686 return s !== ''; 15687 }); 15688 15689 // need a string search offset in cases where the mask contains multiple identical components 15690 // E.g., a mask of 99.99.99-999.99 15691 var offset = 0; 15692 return components.map(function (c) { 15693 var componentPosition = maskPlaceholderCopy.indexOf(c, offset); 15694 offset = componentPosition + 1; 15695 return { 15696 value: c, 15697 position: componentPosition 15698 }; 15699 }); 15700 } 15701 15702 function processRawMask(mask) { 15703 var characterCount = 0; 15704 15705 maskCaretMap = []; 15706 maskPatterns = []; 15707 maskPlaceholder = ''; 15708 15709 if (angular.isString(mask)) { 15710 minRequiredLength = 0; 15711 15712 var isOptional = false, 15713 numberOfOptionalCharacters = 0, 15714 splitMask = mask.split(''); 15715 15716 var inEscape = false; 15717 angular.forEach(splitMask, function (chr, i) { 15718 if (inEscape) { 15719 inEscape = false; 15720 maskPlaceholder += chr; 15721 characterCount++; 15722 } 15723 else if (linkOptions.escChar === chr) { 15724 inEscape = true; 15725 } 15726 else if (linkOptions.maskDefinitions[chr]) { 15727 maskCaretMap.push(characterCount); 15728 15729 maskPlaceholder += getPlaceholderChar(i - numberOfOptionalCharacters); 15730 maskPatterns.push(linkOptions.maskDefinitions[chr]); 15731 15732 characterCount++; 15733 if (!isOptional) { 15734 minRequiredLength++; 15735 } 15736 15737 isOptional = false; 15738 } 15739 else if (chr === '?') { 15740 isOptional = true; 15741 numberOfOptionalCharacters++; 15742 } 15743 else { 15744 maskPlaceholder += chr; 15745 characterCount++; 15746 } 15747 }); 15748 } 15749 // Caret position immediately following last position is valid. 15750 maskCaretMap.push(maskCaretMap.slice().pop() + 1); 15751 15752 maskComponents = getMaskComponents(); 15753 maskProcessed = maskCaretMap.length > 1 ? true : false; 15754 } 15755 15756 var prevValue = iElement.val(); 15757 function blurHandler() { 15758 if (linkOptions.clearOnBlur || ((linkOptions.clearOnBlurPlaceholder) && (value.length === 0) && iAttrs.placeholder)) { 15759 oldCaretPosition = 0; 15760 oldSelectionLength = 0; 15761 if (!isValid || value.length === 0) { 15762 valueMasked = ''; 15763 iElement.val(''); 15764 scope.$apply(function () { 15765 //only $setViewValue when not $pristine to avoid changing $pristine state. 15766 if (!controller.$pristine) { 15767 controller.$setViewValue(''); 15768 } 15769 }); 15770 } 15771 } 15772 //Check for different value and trigger change. 15773 //Check for different value and trigger change. 15774 if (value !== prevValue) { 15775 // #157 Fix the bug from the trigger when backspacing exactly on the first letter (emptying the field) 15776 // and then blurring out. 15777 // Angular uses html element and calls setViewValue(element.value.trim()), setting it to the trimmed mask 15778 // when it should be empty 15779 var currentVal = iElement.val(); 15780 var isTemporarilyEmpty = value === '' && currentVal && angular.isDefined(iAttrs.uiMaskPlaceholderChar) && iAttrs.uiMaskPlaceholderChar === 'space'; 15781 if (isTemporarilyEmpty) { 15782 iElement.val(''); 15783 } 15784 triggerChangeEvent(iElement[0]); 15785 if (isTemporarilyEmpty) { 15786 iElement.val(currentVal); 15787 } 15788 } 15789 prevValue = value; 15790 } 15791 15792 function triggerChangeEvent(element) { 15793 var change; 15794 if (angular.isFunction(window.Event) && !element.fireEvent) { 15795 // modern browsers and Edge 15796 try { 15797 change = new Event('change', { 15798 view: window, 15799 bubbles: true, 15800 cancelable: false 15801 }); 15802 } catch (ex) { 15803 //this is for certain mobile browsers that have the Event object 15804 //but don't support the Event constructor #168 15805 change = document.createEvent('HTMLEvents'); 15806 change.initEvent('change', false, true); 15807 } finally { 15808 element.dispatchEvent(change); 15809 } 15810 } else if ('createEvent' in document) { 15811 // older browsers 15812 change = document.createEvent('HTMLEvents'); 15813 change.initEvent('change', false, true); 15814 element.dispatchEvent(change); 15815 } 15816 else if (element.fireEvent) { 15817 // IE <= 11 15818 element.fireEvent('onchange'); 15819 } 15820 } 15821 15822 function mouseDownUpHandler(e) { 15823 if (e.type === 'mousedown') { 15824 iElement.bind('mouseout', mouseoutHandler); 15825 } else { 15826 iElement.unbind('mouseout', mouseoutHandler); 15827 } 15828 } 15829 15830 iElement.bind('mousedown mouseup', mouseDownUpHandler); 15831 15832 function mouseoutHandler() { 15833 /*jshint validthis: true */ 15834 oldSelectionLength = getSelectionLength(this); 15835 iElement.unbind('mouseout', mouseoutHandler); 15836 } 15837 15838 function keydownHandler(e) { 15839 /*jshint validthis: true */ 15840 var isKeyBackspace = e.which === 8, 15841 caretPos = getCaretPosition(this) - 1 || 0, //value in keydown is pre change so bump caret position back to simulate post change 15842 isCtrlZ = e.which === 90 && e.ctrlKey; //ctrl+z pressed 15843 15844 if (isKeyBackspace) { 15845 while (caretPos >= 0) { 15846 if (isValidCaretPosition(caretPos)) { 15847 //re-adjust the caret position. 15848 //Increment to account for the initial decrement to simulate post change caret position 15849 setCaretPosition(this, caretPos + 1); 15850 break; 15851 } 15852 caretPos--; 15853 } 15854 preventBackspace = caretPos === -1; 15855 } 15856 15857 if (isCtrlZ) { 15858 // prevent IE bug - value should be returned to initial state 15859 iElement.val(''); 15860 e.preventDefault(); 15861 } 15862 } 15863 15864 function eventHandler(e) { 15865 /*jshint validthis: true */ 15866 e = e || {}; 15867 // Allows more efficient minification 15868 var eventWhich = e.which, 15869 eventType = e.type; 15870 15871 // Prevent shift and ctrl from mucking with old values 15872 if (eventWhich === 16 || eventWhich === 91) { 15873 return; 15874 } 15875 15876 var val = iElement.val(), 15877 valOld = oldValue, 15878 valMasked, 15879 valAltered = false, 15880 valUnmasked = unmaskValue(val), 15881 valUnmaskedOld = oldValueUnmasked, 15882 caretPos = getCaretPosition(this) || 0, 15883 caretPosOld = oldCaretPosition || 0, 15884 caretPosDelta = caretPos - caretPosOld, 15885 caretPosMin = maskCaretMap[0], 15886 caretPosMax = maskCaretMap[valUnmasked.length] || maskCaretMap.slice().shift(), 15887 selectionLenOld = oldSelectionLength || 0, 15888 isSelected = getSelectionLength(this) > 0, 15889 wasSelected = selectionLenOld > 0, 15890 // Case: Typing a character to overwrite a selection 15891 isAddition = (val.length > valOld.length) || (selectionLenOld && val.length > valOld.length - selectionLenOld), 15892 // Case: Delete and backspace behave identically on a selection 15893 isDeletion = (val.length < valOld.length) || (selectionLenOld && val.length === valOld.length - selectionLenOld), 15894 isSelection = (eventWhich >= 37 && eventWhich <= 40) && e.shiftKey, // Arrow key codes 15895 15896 isKeyLeftArrow = eventWhich === 37, 15897 // Necessary due to "input" event not providing a key code 15898 isKeyBackspace = eventWhich === 8 || (eventType !== 'keyup' && isDeletion && (caretPosDelta === -1)), 15899 isKeyDelete = eventWhich === 46 || (eventType !== 'keyup' && isDeletion && (caretPosDelta === 0) && !wasSelected), 15900 // Handles cases where caret is moved and placed in front of invalid maskCaretMap position. Logic below 15901 // ensures that, on click or leftward caret placement, caret is moved leftward until directly right of 15902 // non-mask character. Also applied to click since users are (arguably) more likely to backspace 15903 // a character when clicking within a filled input. 15904 caretBumpBack = (isKeyLeftArrow || isKeyBackspace || eventType === 'click') && caretPos > caretPosMin; 15905 15906 oldSelectionLength = getSelectionLength(this); 15907 15908 // These events don't require any action 15909 if (isSelection || (isSelected && (eventType === 'click' || eventType === 'keyup' || eventType === 'focus'))) { 15910 return; 15911 } 15912 15913 if (isKeyBackspace && preventBackspace) { 15914 iElement.val(maskPlaceholder); 15915 // This shouldn't be needed but for some reason after aggressive backspacing the controller $viewValue is incorrect. 15916 // This keeps the $viewValue updated and correct. 15917 scope.$apply(function () { 15918 controller.$setViewValue(''); // $setViewValue should be run in angular context, otherwise the changes will be invisible to angular and user code. 15919 }); 15920 setCaretPosition(this, caretPosOld); 15921 return; 15922 } 15923 15924 // Value Handling 15925 // ============== 15926 15927 // User attempted to delete but raw value was unaffected--correct this grievous offense 15928 if ((eventType === 'input') && isDeletion && !wasSelected && valUnmasked === valUnmaskedOld) { 15929 while (isKeyBackspace && caretPos > caretPosMin && !isValidCaretPosition(caretPos)) { 15930 caretPos--; 15931 } 15932 while (isKeyDelete && caretPos < caretPosMax && maskCaretMap.indexOf(caretPos) === -1) { 15933 caretPos++; 15934 } 15935 var charIndex = maskCaretMap.indexOf(caretPos); 15936 // Strip out non-mask character that user would have deleted if mask hadn't been in the way. 15937 valUnmasked = valUnmasked.substring(0, charIndex) + valUnmasked.substring(charIndex + 1); 15938 15939 // If value has not changed, don't want to call $setViewValue, may be caused by IE raising input event due to placeholder 15940 if (valUnmasked !== valUnmaskedOld) 15941 valAltered = true; 15942 } 15943 15944 // Update values 15945 valMasked = maskValue(valUnmasked); 15946 15947 oldValue = valMasked; 15948 oldValueUnmasked = valUnmasked; 15949 15950 //additional check to fix the problem where the
15950viewValue is out of sync with the value of the element. 15951 //better fix for commit 2a83b5fb8312e71d220a497545f999fc82503bd9 (I think) 15952 if (!valAltered && val.length > valMasked.length) 15953 valAltered = true; 15954 15955 iElement.val(valMasked); 15956 15957 //we need this check. What could happen if you don't have it is that you'll set the model value without the user 15958 //actually doing anything. Meaning, things like pristine and touched will be set. 15959 if (valAltered) { 15960 scope.$apply(function () { 15961 controller.$setViewValue(valMasked); // $setViewValue should be run in angular context, otherwise the changes will be invisible to angular and user code. 15962 }); 15963 } 15964 15965 // Caret Repositioning 15966 // =================== 15967 15968 // Ensure that typing always places caret ahead of typed character in cases where the first char of 15969 // the input is a mask char and the caret is placed at the 0 position. 15970 if (isAddition && (caretPos <= caretPosMin)) { 15971 caretPos = caretPosMin + 1; 15972 } 15973 15974 if (caretBumpBack) { 15975 caretPos--; 15976 } 15977 15978 // Make sure caret is within min and max position limits 15979 caretPos = caretPos > caretPosMax ? caretPosMax : caretPos < caretPosMin ? caretPosMin : caretPos; 15980 15981 // Scoot the caret back or forth until it's in a non-mask position and within min/max position limits 15982 while (!isValidCaretPosition(caretPos) && caretPos > caretPosMin && caretPos < caretPosMax) { 15983 caretPos += caretBumpBack ? -1 : 1; 15984 } 15985 15986 if ((caretBumpBack && caretPos < caretPosMax) || (isAddition && !isValidCaretPosition(caretPosOld))) { 15987 caretPos++; 15988 } 15989 oldCaretPosition = caretPos; 15990 setCaretPosition(this, caretPos); 15991 } 15992 15993 function isValidCaretPosition(pos) { 15994 return maskCaretMap.indexOf(pos) > -1; 15995 } 15996 15997 function getCaretPosition(input) { 15998 if (!input) 15999 return 0; 16000 if (input.selectionStart !== undefined) { 16001 return input.selectionStart; 16002 } else if (document.selection) { 16003 if (isFocused(iElement[0])) { 16004 // Curse you IE 16005 input.focus(); 16006 var selection = document.selection.createRange(); 16007 selection.moveStart('character', input.value ? -input.value.length : 0); 16008 return selection.text.length; 16009 } 16010 } 16011 return 0; 16012 } 16013 16014 function setCaretPosition(input, pos) { 16015 if (!input) 16016 return 0; 16017 if (input.offsetWidth === 0 || input.offsetHeight === 0) { 16018 return; // Input's hidden 16019 } 16020 if (input.setSelectionRange) { 16021 if (isFocused(iElement[0])) { 16022 input.focus(); 16023 input.setSelectionRange(pos, pos); 16024 } 16025 } 16026 else if (input.createTextRange) { 16027 // Curse you IE 16028 var range = input.createTextRange(); 16029 range.collapse(true); 16030 range.moveEnd('character', pos); 16031 range.moveStart('character', pos); 16032 range.select(); 16033 } 16034 } 16035 16036 function getSelectionLength(input) { 16037 if (!input) 16038 return 0; 16039 if (input.selectionStart !== undefined) { 16040 return (input.selectionEnd - input.selectionStart); 16041 } 16042 if (window.getSelection) { 16043 return (window.getSelection().toString().length); 16044 } 16045 if (document.selection) { 16046 return (document.selection.createRange().text.length); 16047 } 16048 return 0; 16049 } 16050 16051 // https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/indexOf 16052 if (!Array.prototype.indexOf) { 16053 Array.prototype.indexOf = function (searchElement /*, fromIndex */) { 16054 if (this === null) { 16055 throw new TypeError(); 16056 } 16057 var t = Object(this); 16058 var len = t.length >>> 0; 16059 if (len === 0) { 16060 return -1; 16061 } 16062 var n = 0; 16063 if (arguments.length > 1) { 16064 n = Number(arguments[1]); 16065 if (n !== n) { // shortcut for verifying if it's
16065NaN 16066 n = 0; 16067 } else if (n !== 0 && n !== Infinity && n !== -Infinity) { 16068 n = (n > 0 || -1) * Math.floor(Math.abs(n)); 16069 } 16070 } 16071 if (n >= len) { 16072 return -1; 16073 } 16074 var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0); 16075 for (; k < len; k++) { 16076 if (k in t && t[k] === searchElement) { 16077 return k; 16078 } 16079 } 16080 return -1; 16081 }; 16082 } 16083 16084 }; 16085 } 16086 }; 16087 } 16088 ]); 16089 16090}());; 16091/*! 16092 * angular-slick-carousel 16093 * DevMark <[email protected]> 16094 * https://github.com/devmark/angular-slick-carousel 16095 * Version: 3.1.7 - 2016-08-04T06:17:55.528Z 16096 * License: MIT 16097 */ 16098angular.module('slickCarousel', []) 16099 //global config 16100 .constant('slickCarouselConfig', { 16101 method: {}, 16102 event: {} 16103 }) 16104 .directive('slick', [ 16105 '$timeout', 'slickCarouselConfig', function ($timeout, slickCarouselConfig) { 16106 var slickMethodList, slickEventList; 16107 slickMethodList = ['slickGoTo', 'slickNext', 'slickPrev', 'slickPause', 'slickPlay', 'slickAdd', 'slickRemove', 'slickFilter', 'slickUnfilter', 'unslick']; 16108 slickEventList = ['afterChange', 'beforeChange', 'breakpoint', 'destroy', 'edge', 'init', 'reInit', 'setPosition', 'swipe', 'lazyLoaded', 'lazyLoadError']; 16109 16110 return { 16111 scope: { 16112 settings: '=', 16113 enabled: '@', 16114 accessibility: '@', 16115 adaptiveHeight: '@', 16116 autoplay: '@', 16117 autoplaySpeed: '@', 16118 arrows: '@', 16119 asNavFor: '@', 16120 appendArrows: '@', 16121 prevArrow: '@', 16122 nextArrow: '@', 16123 centerMode: '@', 16124 centerPadding: '@', 16125 cssEase: '@', 16126 customPaging: '&', 16127 dots: '@', 16128 draggable: '@', 16129 fade: '@', 16130 focusOnSelect: '@', 16131 easing: '@', 16132 edgeFriction: '@', 16133 infinite: '@', 16134 initialSlide: '@', 16135 lazyLoad: '@', 16136 mobileFirst: '@', 16137 pauseOnHover: '@', 16138 pauseOnDotsHover: '@', 16139 respondTo: '@', 16140 responsive: '=?', 16141 rows: '@', 16142 slide: '@', 16143 slidesPerRow: '@', 16144 slidesToShow: '@', 16145 slidesToScroll: '@', 16146 speed: '@', 16147 swipe: '@', 16148 swipeToSlide: '@', 16149 touchMove: '@', 16150 touchThreshold: '@', 16151 useCSS: '@', 16152 variableWidth: '@', 16153 vertical: '@', 16154 verticalSwiping: '@', 16155 rtl: '@' 16156 }, 16157 restrict: 'AE', 16158 link: function (scope, element, attr) { 16159 //hide slider 16160 angular.element(element).css('display', 'none'); 16161 16162 var options, initOptions, destroy, init, destroyAndInit, currentIndex; 16163 16164 initOptions = function () { 16165 scope.slickCarouselConfig = scope.settings ? scope.settings : slickCarouselConfig; 16166 options = { 16167 enabled: scope.slickCarouselConfig.enabled !== 'false', 16168 accessibility: scope.slickCarouselConfig.accessibility !== 'false', 16169 adaptiveHeight: scope.slickCarouselConfig.adaptiveHeight === 'true', 16170 autoplay: scope.slickCarouselConfig.auto
16170play === 'true', 16171 autoplaySpeed: scope.slickCarouselConfig.autoplaySpeed != null ? parseInt(scope.slickCarouselConfig.autoplaySpeed, 10) : 3000, 16172 arrows: scope.slickCarouselConfig.arrows !== 'false', 16173 asNavFor: scope.slickCarouselConfig.asNavFor ? scope.slickCarouselConfig.asNavFor : void 0, 16174 appendArrows: scope.slickCarouselConfig.appendArrows ? angular.element(scope.slickCarouselConfig.appendArrows) : angular.element(element), 16175 prevArrow: scope.slickCarouselConfig.prevArrow ? scope.slickCarouselConfig.prevArrow : void 0, 16176 nextArrow: scope.slickCarouselConfig.nextArrow ? scope.slickCarouselConfig.nextArrow : void 0, 16177 centerMode: scope.slickCarouselConfig.centerMode === 'true', 16178 centerPadding: scope.slickCarouselConfig.centerPadding || '50px', 16179 cssEase: scope.slickCarouselConfig.cssEase || 'ease', 16180 customPaging: attr.customPaging ? function (slick, index) { 16181 return scope.slickCarouselConfig.customPaging({ slick: slick, index: index }); 16182 } : void 0, 16183 dots: scope.slickCarouselConfig.dots === 'true', 16184 draggable: scope.slickCarouselConfig.draggable !== 'false', 16185 fade: scope.slickCarouselConfig.fade === 'true', 16186 focusOnSelect: scope.slickCarouselConfig.focusOnSelect === 'true', 16187 easing: scope.slickCarouselConfig.easing || 'linear', 16188 edgeFriction: scope.slickCarouselConfig.edgeFriction || 0.15, 16189 infinite: scope.slickCarouselConfig.infinite !== 'false', 16190 initialSlide: parseInt(scope.slickCarouselConfig.initialSlide) || 0, 16191 lazyLoad: scope.slickCarouselConfig.lazyLoad || 'ondemand', 16192 mobileFirst: scope.slickCarouselConfig.mobileFirst === 'true', 16193 pauseOnHover: scope.slickCarouselConfig.pauseOnHover !== 'false', 16194 pauseOnDotsHover: scope.slickCarouselConfig.pauseOnDotsHover === "true", 16195 respondTo: scope.slickCarouselConfig.respondTo != null ? scope.slickCarouselConfig.respondTo : 'window', 16196 responsive: scope.slickCarouselConfig.responsive || void 0, 16197 rows: scope.slickCarouselConfig.rows != null ? parseInt(scope.slickCarouselConfig.rows, 10) : 1, 16198 slide: scope.slickCarouselConfig.slide || '', 16199 slidesPerRow: scope.slickCarouselConfig.slidesPerRow != null ? parseInt(scope.slickCarouselConfig.slidesPerRow, 10) : 1, 16200 slidesToShow: scope.slickCarouselConfig.slidesToShow != null ? parseInt(scope.slickCarouselConfig.slidesToShow, 10) : 1, 16201 slidesToScroll: scope.slickCarouselConfig.slidesToScroll != null ? parseInt(scope.slickCarouselConfig.slidesToScroll, 10) : 1, 16202 speed: scope.slickCarouselConfig.speed != null ? parseInt(scope.slickCarouselConfig.speed, 10) : 300, 16203 swipe: scope.slickCarouselConfig.swipe !== 'false', 16204 swipeToSlide: scope.slickCarouselConfig.swipeToSlide === 'true', 16205 touchMove: scope.slickCarouselConfig.touchMove !== 'false', 16206 touchThreshold: scope.slickCarouselConfig.touchThreshold ? parseInt(scope.slickCarouselConfig.touchThreshold, 10) : 5, 16207 useCSS: scope.slickCarouselConfig.useCSS !== 'false', 16208 variableWidth: scope.slickCarouselConfig.variableWidth === 'true', 16209 vertical: scope.slickCarouselConfig.vertical === 'true', 16210 verticalSwiping: scope.slickCarouselConfig.verticalSwiping === 'true', 16211 rtl: scope.slickCarouselConfig.rtl === 'true', 16212 method: scope.slickCarouselConfig.method ? scope.slickCarouselConfig.method : {}, 16213 event: scope.slickCarouselConfig.event ? scope.slickCarouselConfig.event : {} 16214 }; 16215 }; 16216 16217 destroy = function () { 16218 var slickness = angular.element(element); 16219 if (slickness.hasClass('slick-initialized')) { 16220 var slickList = slickness.find('.slick-list'); 16221 if (slickList.length && typeof slickList.remove !== 'undefined') slickList.remove(); 16222 slickness.slick('unslick'); 16223 } 16224 16225 return slickness; 16226 }; 16227 16228 init = function () { 16229 initOptions(); 16230 16231 var slickness = angular.element(element); 16232 16233 if (slickness.hasClass('slick-initialized')) { 16234 if (options.enabled) { 16235 return slickness.slick('getSlick'); 16236 } else { 16237 destroy(); 16238 } 16239 } else { 16240 if (!options.enabled) { 16241 return; 16242 } 16243 slickness.on('init', function (event, slick) { 16244 if (slickness[0].querySelector('.slick-arrow')) { 16245 slickness[0].parentNode.setAttribute('role', 'region'); 16246 } else if (typeof slickness[0].parentNode.removeAttribute !== 'undefined') { 16247 slickness[0].parentNode.removeAttribute('aria-label'); 16248 } 16249 if (typeof options.event.init !== 'undefined') { 16250 options.event.init(event, slick); 16251 } 16252 if (typeof currentIndex !== 'undefined') { 16253 return slick.slideHandler(currentIndex); 16254 } 16255 }); 16256 16257 $timeout(function () { 16258 angular.element(element).css('display', 'block'); 16259 slickness.slick(options); 16260 }, 1000); 16261 } 16262 16263 scope.internalControl = options.method || {}; 16264 16265 // Method 16266 slickMethodList.forEach(function (value) { 16267 scope.internalControl[value] = function () { 16268 var args; 16269 args = Array.prototype.slice.call(arguments); 16270 args.unshift(value); 16271 slickness.slick.apply(element, args); 16272 }; 16273 }); 16274 16275 // Event 16276 slickness.on('afterChange', function (event, slick, currentSlide) { 16277 currentIndex = currentSlide; 16278 if (typeof options.event.afterChange !== 'undefined') { 16279 $timeout(function () { 16280 scope.$apply(function () { 16281 options.event.afterChange(event, slick, currentSlide); 16282 }); 16283 }); 16284 } 16285 }); 16286 16287 slickness.on('beforeChange', function (event, slick, currentSlide, nextSlide) { 16288 if (typeof options.event.beforeChange !== 'undefined') { 16289 $timeout(function () { 16290 $timeout(function () { 16291 scope.$apply(function () { 16292 options.event.beforeChange(event, slick, currentSlide, nextSlide); 16293 }); 16294 }); 16295 }); 16296 } 16297 }); 16298 16299 slickness.on('reInit', function (event, slick) { 16300 if (typeof options.event.reInit !== 'undefined') { 16301 $timeout(function () { 16302 scope.$apply(function () { 16303 options.event.reInit(event, slick); 16304 }); 16305 }); 16306 } 16307 }); 16308 16309 if (typeof options.event.breakpoint !== 'undefined') { 16310 slickness.on('breakpoint', function (event, slick, breakpoint) { 16311 $timeout(function () { 16312 scope.$apply(function () { 16313 options.event.breakpoint(event, slick, breakpoint); 16314 }); 16315 }); 16316 }); 16317 } 16318 if (typeof options.event.destroy !== 'undefined') { 16319 slickness.on('destroy', function (event, slick) { 16320 $timeout(function () { 16321 scope.$apply(function () { 16322 options.event.destroy(event, slick); 16323 }); 16324 }); 16325 }); 16326 } 16327 if (typeof options.event.edge !== 'undefined') { 16328 slickness.on('edge', function (event, slick, direction) { 16329 $timeout(function () { 16330 scope.$apply(function () { 16331 options.event.edge(event, slick, direction); 16332 }); 16333 }); 16334 }); 16335 } 16336 16337 if (typeof options.event.setPosition !== 'undefined') { 16338 slickness.on('setPosition', function (event, slick) { 16339 $timeout(function () { 16340 scope.$apply(function () { 16341 options.event.setPosition(event, slick); 16342 }); 16343 }); 16344 }); 16345 } 16346 if (typeof options.event.swipe !== 'undefined') { 16347 slickness.on('swipe', function (event, slick, direction) { 16348 $timeout(function () { 16349 scope.$apply(function () { 16350 options.event.swipe(event, slick, direction); 16351 }); 16352 }); 16353 }); 16354 } 16355 if (typeof options.event.lazyLoaded !== 'undefined') { 16356 slickness.on('lazyLoaded', function (event, slick, image, imageSource) { 16357 $timeout(function () { 16358 scope.$apply(function () { 16359 options.event.lazyLoaded(event, slick, image, imageSource); 16360 }); 16361 }); 16362 }); 16363 } 16364 if (typeof options.event.lazyLoadError !== 'undefined') { 16365 slickness.on('lazyLoadError', function (event, slick, image, imageSource) { 16366 $timeout(function () { 16367 scope.$apply(function () { 16368 options.event.lazyLoadError(event, slick, image, imageSource); 16369 }); 16370 }); 16371 }); 16372 } 16373 }; 16374 16375 destroyAndInit = function () { 16376 destroy(); 16377 init(); 16378 }; 16379 16380 element.one('$destroy', function () { 16381 destroy(); 16382 }); 16383 16384 return scope.$watch('settings', function (newVal, oldVal) { 16385 if (newVal !== null) { 16386 return destroyAndInit(); 16387 } 16388 }, true); 16389 16390 } 16391 }; 16392 } 16393 ]);; 16394var TsgMvc = angular.module("TsgMvc", ['ngMaterial', 'ngSanitize', 'ngMessages', 'payment', 'ngRoute', 'ngCookies', 'md.data.table', 'ui.mask', 'slickCarousel']).config( 16395 function ($compileProvider, $sceDelegateProvider, $mdThemingProvider, $mdDialogProvider, $mdGestureProvider, $mdInkRippleProvider, 16396 $httpProvider, $routeProvider, $locationProvider, slickCarouselConfig) { 16397 16398 //add url protocols to angular's whitelist to prevent it being marked as unsafe in anchor tags 16399 $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|javascript|tel):/); 16400 16401 //ensure we block template injection in the markup by whitelisting our resources 16402 $sceDelegateProvider.resourceUrlWhitelist([ 16403 'self', //same origin 16404 'https://*.baseballsavings.com/**' //asset domains 16405 ]); 16406
16407 //NOTE: we cant enable this until more of the site is angular, and Adobe Target needs access to the scope 16408 //if (window.location.hostname.toLowerCase().match("sportsmansguide")) { 16409 // $compileProvider.debugInfoEnabled(false); //turn off angular annotation and bindings for security/performance boost 16410 //} 16411 16412 if (window.location.href.indexOf("/checkout") >= 0 || 16413 window.location.href.indexOf("/blog") >= 0) { 16414 routeConfig($routeProvider, $locationProvider); 16415 } else { 16416 $locationProvider.html5Mode({ 16417 enabled: true, 16418 requireBase: false, //let MVC.NET do the routing 16419 rewriteLinks: false //don't hijack and rewrite links like we do in checkout for SPA 16420 }); 16421 } 16422 16423 materialConfig($mdThemingProvider, $mdGestureProvider, $mdInkRippleProvider, $mdDialogProvider); 16424 slickConfig(slickCarouselConfig); 16425 16426 $httpProvider.interceptors.push('errorInterceptor'); 16427 $httpProvider.interceptors.push('requestInterceptor'); 16428 transformDates($httpProvider); 16429 16430 if (!$httpProvider.defaults.headers.get) { 16431 $httpProvider.defaults.headers.get = {}; 16432 } 16433 //disable IE ajax request caching 16434 $httpProvider.defaults.headers.get['Cache-Control'] = 'no-cache'; 16435 $httpProvider.defaults.headers.get['Pragma'] = 'no-cache'; 16436 }); 16437 16438//tell angular about the controllers (init cap convention - shout out to Paul) (just like .net mvc controller) 16439if (typeof AccountRewardsCertController !== 'undefined') injectController("AccountRewardsCertController", AccountRewardsCertController); 16440if (typeof AccountCredentialsController !== 'undefined') injectController("AccountCredentialsController", AccountCredentialsController); 16441if (typeof AccountOrderListController !== 'undefined') injectController("AccountOrderListController", AccountOrderListController); 16442if (typeof AccountGiftCardLookupController !== 'undefined') injectController("AccountGiftCardLookupController", AccountGiftCardLookupController); 16443if (typeof AddressBookController !== 'undefined') injectController("AddressBookController", AddressBookController); 16444if (typeof AuthenticateController !== 'undefined') injectController("AuthenticateController", AuthenticateController); 16445if (typeof BlogHomeController !== 'undefined') injectController("BlogHomeController", BlogHomeController); 16446if (typeof BlogCategoryController !== 'undefined') injectController("BlogCategoryController", BlogCategoryController); 16447if (typeof BuyMoreSaveMoreController !== 'undefined') injectController("BuyMoreSaveMoreController", BuyMoreSaveMoreController); 16448if (typeof CartEntryListController !== 'undefined') injectController("CartEntryListController", CartEntryListController); 16449if (typeof CartWishListHomepageController !== 'undefined') injectController("CartWishListHomepageController", CartWishListHomepageController); 16450if (typeof ChatDialogController !== 'undefined') injectController("ChatDialogController", ChatDialogController); 16451if (typeof CheckoutController !== 'undefined') injectController("CheckoutController", CheckoutController); 16452if (typeof CompanionProductsController !== 'undefined') injectController("CompanionProductsController", CompanionProductsController); 16453if (typeof CouponDialogController !== 'undefined') injectController("CouponDialogController", CouponDialogController); 16454if (typeof CQOController !== 'undefined') injectController("CQOController", CQOController); 16455if (typeof CustomerServiceController !== 'undefined') injectController("CustomerServiceController", CustomerServiceController); 16456if (typeof DepartmentController !== 'undefined') injectController("DepartmentController", DepartmentController); 16457if (typeof DoubleWideController !== 'undefined') injectController("DoubleWideController", DoubleWideController); 16458if (typeof EmailVideoController !== 'undefined') injectController("EmailVideoController", EmailVideoController); 16459if (typeof EmailUsController !== 'undefined') injectController("EmailUsController", EmailUsController); 16460if (typeof EmailPreferencesController !== 'undefined') injectController("EmailPreferencesController", EmailPreferencesController); 16461if (typeof EpisodesController !== 'undefined') injectController("EpisodesController", EpisodesController); 16462if (typeof FreeGiftController !== 'undefined') injectController("FreeGiftController", FreeGiftController); 16463if (typeof FlyoutController !== 'undefined') injectController("FlyoutController", FlyoutController); 16464if (typeof FindCustNumController !== 'undefined') injectController("FindCustNumController", FindCustNumController); 16465if (typeof GiftCardRecipientController !== 'undefined') injectController("GiftCardRecipientController", GiftCardRecipientController); 16466if (typeof GloveBreakInController !== 'undefined') injectController("GloveBreakInController", GloveBreakInController); 16467if (typeof ITACVendorDocumentsController !== 'undefined') injectController("ITACVendorDocumentsController", ITACVendorDocumentsController); 16468if (typeof ItemAddedDialogController !== 'undefined') injectController("ItemAddedDialogController", ItemAddedDialogController); 16469if (typeof ImageGalleryController !== 'undefined') injectController("ImageGalleryController", ImageGalleryController); 16470if (typeof LoyaltyTransactionsController !== 'undefined') injectController("LoyaltyTransactionsController", LoyaltyTransactionsController); 16471if (typeof MakePaymentController !== 'undefined') injectController("MakePaymentController", MakePaymentController); 16472if (typeof OrderConfirmationController !== 'undefined') injectController("OrderConfirmationController", OrderConfirmationController);
16473if (typeof OrderListController !== 'undefined') injectController("OrderListController", OrderListController); 16474if (typeof OrderStatusTableController !== 'undefined') injectController("OrderStatusTableController", OrderStatusTableController); 16475if (typeof OrderTrackingController !== 'undefined') injectController("OrderTrackingController", OrderTrackingController); 16476if (typeof PickYourPathController !== 'undefined') injectController("PickYourPathController", PickYourPathController); 16477if (typeof ProductClubAddToCartController !== 'undefined') injectController("ProductClubAddToCartController", ProductClubAddToCartController); 16478if (typeof ProductGroupController !== 'undefined') injectController("ProductGroupController", ProductGroupController); 16479if (typeof ProductListController !== 'undefined') injectController("ProductListController", ProductListController); 16480if (typeof ProductListFilterController !== 'undefined') injectController("ProductListFilterController", ProductListFilterController); 16481if (typeof ProductOptionsController !== 'undefined') injectController("ProductOptionsController", ProductOptionsController); 16482if (typeof ProductSuggestionsController !== 'undefined') injectController("ProductSuggestionsController", ProductSuggestionsController); 16483if (typeof RecipesController !== 'undefined') injectController("RecipesController", RecipesController); 16484if (typeof RoundUpController !== 'undefined') injectController("RoundUpController", RoundUpController); 16485if (typeof MyWalletController !== 'undefined') injectController("MyWalletController", MyWalletController); 16486if (typeof StickyAddToCartController !== 'undefined') injectController("StickyAddToCartController", StickyAddToCartController); 16487if (typeof SezzleToolTipController !== 'undefined') injectController("SezzleToolTipController", SezzleToolTipController); 16488if (typeof SummaryLookupController !== 'undefined') injectController("SummaryLookupController", SummaryLookupController); 16489if (typeof MyAccountClubBucksDialogController !== 'undefined') injectController("MyAccountClubBucksDialogController", MyAccountClubBucksDialogController); 16490if (typeof MyTransactionsController !== 'undefined') injectController("MyTransactionsController", MyTransactionsController); 16491if (typeof ViewCartController !== 'undefined') injectController("ViewCartController", ViewCartController); 16492if (typeof ViewWishListController !== 'undefined') injectController("ViewWishListController", ViewWishListController); 16493if (typeof WarrantyController !== 'undefined') injectController("WarrantyController", WarrantyController); 16494if (typeof LandingController !== 'undefined') injectController("LandingController", LandingController); 16495if (typeof ZipRestrictController !== 'undefined') injectController("ZipRestrictController", ZipRestrictController); 16496if (typeof LifestylePlusFiveController !== 'undefined') injectController("LifestylePlusFiveController", LifestylePlusFiveController); 16497if (typeof OrderPayByLinkController !== 'undefined') injectController("OrderPayByLinkController", OrderPayByLinkController); 16498 16499//tell angular about the services (_camelCase convention) (think of as a handler) 16500if (typeof _accountService !== 'undefined') injectService("_accountService", _accountService); 16501if (typeof _addressService !== 'undefined') injectService("_addressService", _addressService); 16502if (typeof _algoliaService !== 'undefined') injectService("_algoliaService", _algoliaService); 16503if (typeof _authenticateService !== 'undefined') injectService("_authenticateService", _authenticateService); 16504if (typeof _blogService !== 'undefined') injectService("_blogService", _blogService); 16505if (typeof _bloomreachService !== 'undefined') injectService("_bloomreachService", _bloomreachService); 16506if (typeof _cartService !== 'undefined') injectService("_cartService", _cartService); 16507if (typeof _certonaService !== 'undefined') injectService("_certonaService", _certonaService); 16508if (typeof _chatService !== 'undefined') injectService("_chatService", _chatService); 16509if (typeof _checkoutService !== 'undefined') injectService("_checkoutService", _checkoutService); 16510if (typeof _cloudflareService !== 'undefined') injectService("_cloudflareService", _cloudflareService); 16511if (typeof _clubService !== 'undefined') injectService("_clubService", _clubService); 16512if (typeof _configService !== 'undefined') injectService("_configService", _configService); 16513if (typeof _customerServiceService !== 'undefined') injectService("_customerServiceService", _customerServiceService); 16514if (typeof _logService !== 'undefined') injectService("_logService", _logService); 16515if (typeof _mediaService !== 'undefined') injectService("_mediaService", _mediaService); 16516if (typeof _orderService !== 'undefined') injectService("_orderService", _orderService); 16517if (typeof _paymentService !== 'undefined') injectService("_paymentService", _paymentService); 16518if (typeof _productService !== 'undefined') injectService("_productService", _productService); 16519if (typeof _shippingService !== 'undefined') injectService("_shippingService", _shippingService); 16520if (typeof _userService !== 'undefined') injectService("_userService", _userService); 16521if (typeof _vendorDocumentService !== 'undefined') injectService("_vendorDocumentService", _vendorDocumentService); 16522if (typeof _webPageService !== 'undefined') injectService("_webPageService", _webPageService); 16523if (typeof _wishlistService !== 'undefined') injectService("_wishlistService", _wishlistService); 16524if (typeof _zipRestrictService !== 'undefined') injectService("_zipRestrictService", _zipRestrictService); 16525 16526//factories 16527injectFactory("$exceptionHandler", exceptionHandler); 16528injectFactory("errorInterceptor", errorInterceptor); 16529injectFactory("requestInterceptor", requestInterceptor); 16530injectFactory("youTubeApiService", youTubeApiService); 16531 16532//tell angular about directives (ng-camelCase convention) (think of as attributes in mvc .net) 16533injectDirective('accordionTrigger', accordionDirective); 16534injectDirective('addToCart', addToCartDirective); 16535injectDirective('addToWishlist', addToWishlistDirective); 16536injectDirective('algoliainsight', algoliaInsightDirective); 16537injectDirective('bindTemplateTo', bindTemplateDirective); 16538injectDirective('cfVideo', cfVideoDirective); 16539injectDirective('clickOutside', clickOutsideDirective); 16540injectDirective('closeModalMat', closeModalMatDirective); 16541injectDirective('clubprice', clubPriceDirective); 16542injectDirective('elementReady', elementReadyDirective); 16543injectDirective('focusElement', focusElementDirective); 16544injectDirective('ng-formModel', formModelDirective); 16545injectDirective('notifyMe', notifyMeDirective); 16546injectDirective('infowindow', infoWindowDirective); 16547injectDirective('loading', loadingDirective); 16548injectDirective('navUrl', navUrlDirective); 16549injectDirective('scrollTo', scrollToDirective); 16550injectDirective('togglePanel', togglePanelDirective); 16551injectDirective('toggleSidenav', toggleSidenavDirective); 16552injectDirective('toggleWarranty', toggleWarrantyDirective); 16553injectDirective('showModal', showModalDirective); 16554injectDirective('youtube', youtubeDirective); 16555 16556//validation directives 16557injectDirective('zipus', zipUsDirective); 16558injectDirective('zipca', zipCaDirective); 16559injectDirective('phone', phoneDirective); 16560injectDirective('phoneCustom', phoneCustomDirective); 16561injectDirective('phoneintl', phoneIntlDirective); 16562injectDirective('email', emailDirective); 16563injectDirective('euemail', euEmailDirective); 16564injectDirective('passwordinput', passwordInputDirective); 16565injectDirective('passwordMatch', passwordMatchDirective); 16566injectDirective('restrictedCharacters', restrictedCharactersDirective); 16567injectDirective('numeric', numericDirective); 16568injectDirective('numericNoDecimals', numericNoDecimalsDirective); 16569 16570//responsive directives 16571injectDirective('desktopOnly', desktopOnlyDirective); 16572injectDirective('tabletDesktopOnly', desktopOnlyDirective); 16573injectDirective('fabletOnly', fabletOnlyDirective); 16574injectDirective('mobileOnly', mobileOnlyDirective); 16575 16576//filters 16577TsgMvc.filter('capitalize', function () { 16578 return function (input) { 16579 return (angular.isString(input) && input.length > 0) 16580 ? input.charAt(0).toUpperCase() + input.substr(1).toLowerCase() 16581 : input; 16582 }}); 16583 16584TsgMvc.filter('toLowerCase', function () { 16585 return function (input) { 16586 return (angular.isString(input) && input.length > 0) ? input.toLowerCase() : input; 16587 }}); 16588 16589TsgMvc.filter('htmlRaw', ['$sce', function ($sce) { 16590 return function (html) { return $sce.trustAsHtml(html); }; 16591}]); 16592 16593TsgMvc.filter('urlEncode', function () { return window.encodeURIComponent; });
16594 16595TsgMvc.filter('randomize', function () { 16596 return function (input, scope) { 16597 if (input && input > 1) { 16598 return Math.floor((Math.random() * input) + 1); 16599 } 16600}}); 16601 16602TsgMvc.filter('unique', function () { 16603 return function (arr, targetField) { 16604 var values = [], i, unique, l = arr.length, results = [], obj; 16605 for (i = 0; i < arr.length; i++) { 16606 obj = arr[i]; 16607 unique = true; 16608 for (v = 0; v < values.length; v++) { 16609 if (obj[targetField] == values[v]) { 16610 unique = false; 16611 } 16612 } 16613 if (unique) { 16614 values.push(obj[targetField]); 16615 results.push(obj); 16616 } 16617 } 16618 return results; 16619 }; 16620}); 16621 16622TsgMvc.filter('startFrom', function () { 16623 return function (input, start) { 16624 if (input) { 16625 start = +start; //parse to int 16626 return input.slice(start); 16627 } 16628 return []; 16629 } 16630}); 16631 16632TsgMvc.filter('tel', function () { 16633 return function (tel) { 16634 if (!tel) { return ''; } 16635 var value = tel.toString().trim().replace(/^\+/, ''); 16636 if (value.match(/[^0-9]/)) return tel; 16637 16638 var country, city, number; 16639 switch (value.length) { 16640 case 10: // +1PPP####### -> C (PPP) ###-#### 16641 country = 1; 16642 city = value.slice(0, 3); 16643 number = value.slice(3); 16644 break; 16645 16646 case 11: // +CPPP####### -> CCC (PP) ###-#### 16647 country = value[0]; 16648 city = value.slice(1, 4); 16649 number = value.slice(4); 16650 break; 16651 16652 case 12: // +CCCPP####### -> CCC (PP) ###-#### 16653 country = value.slice(0, 3); 16654 city = value.slice(3, 5); 16655 number = value.slice(5); 16656 break; 16657 16658 default: return tel; 16659 } 16660 16661 if (country === 1) country = ""; 16662 number = number.slice(0, 3) + '-' + number.slice(3); 16663 return (country + " (" + city + ") " + number).trim(); 16664 }; 16665}); 16666 16667TsgMvc.filter('friendlyCamel', function () { 16668 return function (input) { 16669 if (!input) return undefined; 16670 return input.replace(/([A-Z])/g, ' $1').trim(); 16671 } 16672}); 16673 16674TsgMvc.filter('positive', function () { 16675 return function (num) { return Math.abs(num); } 16676}); 16677 16678 16679//private functions 16680function routeConfig($routeProvider, $locationProvider) { 16681 16682 $routeProvider 16683 .when("/checkout/:stepId?", 16684 { 16685 templateUrl: function (params) { 16686 return params.stepId == undefined 16687 ? "/templates/checkout/main-checkout.html" 16688 : "/templates/checkout/steps/" + params.stepId + ".html"; 16689 } 16690 }) 16691 .when("/blog/:category?", 16692 { 16693 templateUrl: function (params) { 16694 return params.c == undefined 16695 ? "/templates/blog/blog-home.html" 16696 : "/templates/blog/blog-category.html"; 16697 } 16698 }); 16699 //.otherwise("/ourAngular404Page", {}}) 16700 16701 $locationProvider.html5Mode({ enabled: true, hashPrefix: '!', rewriteLinks: false }); 16702} 16703 16704function materialConfig($mdThemingProvider, $mdGestureProvider, $mdInkRippleProvider, $mdDialogProvider) { 16705 $mdThemingProvider.theme('sg-material') 16706 .primaryPalette('grey') 16707 .accentPalette('grey'); 16708 $mdThemingProvider.setDefaultTheme('sg-material'); 16709 16710 //these greatly impact performance in IE 11, theme styles are pasted into their own base.scss file 16711 $mdThemingProvider.disableTheming(); 16712 $mdGestureProvider.disableAll(); 16713 $mdInkRippleProvider.disableInkRipple(); 16714 16715 $mdDialogProvider.addPreset('modal', 16716 { 16717 options: function () { 16718 return { 16719 clickOutsideToClose: true, 16720 disableParentScroll: true, 16721 escapeToClose: true, 16722 focusOnOpen: true, 16723 preserveScope: true, 16724 templateUrl: "/templates/shared/modal.html", 16725 onShowing: function () { lastFocus = document.activeElement; }, 16726 onRemoving: function () { if (lastFocus) lastFocus.focus(); }, 16727 locals: { lastFocus: undefined } 16728 }; 16729 } 16730 }); 16731 16732 $mdDialogProvider.addPreset('restrictedModal', 16733 { 16734 options: function () { 16735 return { 16736 clickOutsideToClose: false, 16737 disableParentScroll: true, 16738 escapeToClose: false, 16739 focusOnOpen: true, 16740 preserveScope: true, 16741 templateUrl: "/templates/shared/restrictedmodal.html", 16742 onShowing: function() { lastFocus = document.activeElement; }, 16743 onRemoving: function () { if (lastFocus) lastFocus.focus(); }, 16744 locals: { lastFocus: undefined } 16745 }; 16746 } 16747 }); 16748} 16749 16750function slickConfig(slickCarouselConfig) { 16751 slickCarouselConfig.accessibility = true; 16752 slickCarouselConfig.arrows = true;
16753 slickCarouselConfig.autoplay = false; 16754 slickCarouselConfig.dots = true; 16755 slickCarouselConfig.infinite = true; 16756 slickCarouselConfig.lazyLoad = 'ondemand'; 16757 slickCarouselConfig.slidesToShow = 4; 16758 slickCarouselConfig.slidesToScroll = 4; 16759 slickCarouselConfig.prevArrow = '<span class="sg-slick-prev" role="button" aria-label="Previous" tabindex="0"> ‹ </span>'; 16760 slickCarouselConfig.nextArrow = '<span class="sg-slick-next" role="button" aria-label="Next" tabindex="0"> › </span>'; 16761 16762 slickCarouselConfig.event = { 16763 init: function(event, slick) { 16764 window.setTimeout(function() { 16765 window.hookUpQuickViews(slick.$list); 16766 }, 250); 16767 } 16768 }; 16769 16770 slickCarouselConfig.responsive = [ 16771 { 16772 breakpoint: 1060, 16773 settings: { 16774 slidesToShow: 3, 16775 slidesToScroll: 3, 16776 arrows: true, 16777 dots: true 16778 } 16779 }, 16780 { 16781 breakpoint: 768, 16782 settings: { 16783 slidesToShow: 2, 16784 slidesToScroll: 2, 16785 arrows: true, 16786 dots: true 16787 } 16788 }, 16789 { 16790 breakpoint: 480, 16791 settings: { 16792 slidesToShow: 1, 16793 slidesToScroll: 1, 16794 arrows: true, 16795 dots: true 16796 } 16797 } 16798 ]; 16799} 16800 16801//converts json date strings (/Date(-62135575200000)/) to moment date objects to and from the server 16802function transformDates($httpProvider) { 16803 $httpProvider.defaults.transformResponse.push(function (responseData) { 16804 convertDateStringsToDates(responseData); 16805 return responseData; 16806 }); 16807 $httpProvider.defaults.transformRequest.push(function (requestData) { 16808 convertDateStringsToDates(requestData); 16809 return requestData; 16810 }); 16811} 16812 16813function convertDateStringsToDates(input) { 16814 var regEx = /^\/Date\((?:-(\d+))?\)\/$/; 16815 var regEx2 = /^\/Date\((\d+)(?:-(\d+))?\)\/$/; 16816 16817 if (typeof input !== "object") return input; 16818 16819 for (var key in input) { 16820 if (!input.hasOwnProperty(key)) continue; 16821 16822 var value = input[key]; 16823 16824 if (typeof value === "string") { 16825 var match1 = value.match(regEx); 16826 var match2 = value.match(regEx2); 16827 if (!match1 && !match2) continue; 16828 16829 var date = match1 ? match1[0] : match2[0]; 16830 var milliseconds = moment(date); 16831 if (!isNaN(milliseconds)) { 16832 input[key] = moment(milliseconds).toDate(); 16833 } 16834 } else if (typeof value === "object") { 16835 convertDateStringsToDates(value); 16836 } 16837 } 16838} 16839 16840function injectController(id, controller) { 16841 if (controller) { 16842 TsgMvc.controller(id, controller); 16843 } 16844} 16845 16846function injectFactory(id, factory) { 16847 if (factory) { 16848 TsgMvc.factory(id, factory); 16849 } 16850} 16851 16852function injectService(id, service) { 16853 if (service) { 16854 TsgMvc.service(id, service); 16855 } 16856} 16857 16858function injectDirective(id, directive) { 16859 if (directive) { 16860 TsgMvc.directive(id, directive); 16861 } 16862};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.