define(["modules/maps/module"],function(a){"use strict";var b=0;a.registerDirective("smartMapInstance",["$q","uiGmapGoogleMapApi","uiGmapIsReady","SmartMapInstances",function(a,c,d,e){return{restrict:"A",compile:function(c,f){b++,c.removeAttr("smart-map-instance data-smart-map-instance").addClass("smart-map-instance");var g=c.scope(),h=f.smartMapInstance,i=a.defer();e.add(h,i.promise),c.data("smart.map.dfd",i),d.promise(b).then(function(){$(".smart-map-instance").each(function(){var a=$(this),b=a.children(".angular-google-map").scope().map;a.data("smart.map.dfd").resolve(b)})}),c.on("$destroy",function(){e.remove(h)}),i.promise.then(function(a){g.$on("$smartContentResize",function(){google.maps.event.trigger(a,"resize")})})}}}])});