define([],function(){'use strict';var FdnContext={_fdnContacts:[],_cloneObject:function(obj){return JSON.parse(JSON.stringify(obj));},getContacts:function(cardIndex){var promise=new Promise((resolve,reject)=>{var iccId=navigator.mozMobileConnections[cardIndex].iccId;if(!iccId){console.log('can\'t get right iccId');reject();} var icc=navigator.mozIccManager.getIccById(iccId);if(!icc){console.log('Could not retrieve ICC object');reject();} var request=icc.readContacts('fdn');request.onerror=(error)=>{console.log('we got error when reading contacts from icc');console.log(error);reject();};request.onsuccess=()=>{var result=this._fdnContacts[cardIndex]=request.result;var contacts=[];for(var i=0,l=result.length;i